Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ jobs:
exit 1
fi

whl_url="file://$(python -c 'import os,sys; print(os.path.abspath(sys.argv[1]))' "${whl_path[0]}")"

echo "Adding easydynamics from: $whl_url"
pixi add --pypi "easydynamics[dev] @ ${whl_url}"
whl_path=$(python -c 'import os,sys; print(os.path.relpath(os.path.abspath(sys.argv[1]), os.getcwd()))' "${whl_path[0]}")

echo "Adding easydynamics from local wheel: $whl_path"
pixi add --pypi "easydynamics[dev] @ ${whl_path}"

echo "Exiting pixi project directory"
cd ..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ class JumpTranslationalDiffusion(DiffusionModelBase):
units of 1/angstrom. Creates ComponentCollections with Lorentzian components for given
Q-values.

Example: >>> Q = np.linspace(0.5, 2, 7) >>> energy = np.linspace(-2, 2, 501) >>> scale = 1.0
>>> diffusion_coefficient = 2.4e-9 # m^2/s >>> relaxation_time = 1.0 # ps >>>
diffusion_model=JumpTranslationalDiffusion( >>> scale = scale, diffusion_coefficient =
(diffusion_coefficient,) >>> relaxation_time=relaxation_time) >>> component_collections= >>>
diffusion_model.create_component_collections(Q) See also the tutorials..
Examples
--------
>>> Q = np.linspace(0.5, 2, 7)
>>> energy = np.linspace(-2, 2, 501)
>>> scale = 1.0
>>> diffusion_coefficient = 2.4e-9 # m^2/s
>>> relaxation_time = 1.0 # ps
>>> diffusion_model = JumpTranslationalDiffusion(
>>> scale=scale,
>>> diffusion_coefficient=(diffusion_coefficient,),
>>> relaxation_time=relaxation_time,
>>> )
>>> component_collections = diffusion_model.create_component_collections(Q)

See also the tutorials..
"""

def __init__(
Expand All @@ -50,12 +60,12 @@ def __init__(

Parameters
----------
display_name : str | None, default='JumpTranslationalDiffusion'
display_name : str | None, default="JumpTranslationalDiffusion"
Display name of the diffusion model.
unique_name : str | None, default=None
Unique name of the diffusion model. If None, a unique name will be generated. By
default, None.
unit : str | sc.Unit, default='meV'
unit : str | sc.Unit, default="meV"
Unit of the diffusion model. Must be convertible to meV.
scale : Numeric, default=1.0
Scale factor for the diffusion model. Must be a non-negative number.
Expand Down Expand Up @@ -260,7 +270,7 @@ def create_component_collections(
----------
Q : Q_type
Scattering vector in 1/angstrom. Can be a single value or an array of values.
component_display_name : str, default='Jump translational diffusion'
component_display_name : str, default="Jump translational diffusion"
Name of the Jump Diffusion Lorentzian component.

Raises
Expand Down
Loading