IMLCV.base.MdEngine#
MD engine class peforms MD simulations in a given NVT/NPT ensemble.
Classes#
Base class for dataclasses that should act like a JAX pytree node. |
|
Base class for MD engine. |
Module Contents#
- class IMLCV.base.MdEngine.StaticMdInfo#
- _attr = ['timestep', 'r_cut', 'timecon_thermo', 'T', 'P', 'timecon_baro', 'write_step', 'equilibration',...#
- _arr = ['atomic_numbers']#
- property masses#
- property thermostat#
- property barostat#
- property neighbour_list_info: IMLCV.base.CV.NeighbourListInfo#
- __post_init__()#
- _save(hf: h5py.File)#
- save(filename: str | pathlib.Path)#
- static _load(hf: h5py.File) StaticMdInfo#
- static load(filename) StaticMdInfo#
- class IMLCV.base.MdEngine.TrajectoryInfo(*args, **kwargs)#
Bases:
IMLCV.base.datastructures.MyPyTreeNodeBase class for dataclasses that should act like a JAX pytree node.
- _items_scal = ['_t', '_e_pot', '_e_bias', '_T', '_P', '_err', '_w', '_rho']#
- _items_vec = ['_positions', '_cell', '_charges', '_cv', '_cv_orig']#
- static create(positions: jax.Array, cell: jax.Array | None = None, charges: jax.Array | None = None, e_pot: jax.Array | None = None, e_bias: jax.Array | None = None, cv: jax.Array | None = None, cv_orig: jax.Array | None = None, w: jax.Array | None = None, rho: jax.Array | None = None, T: jax.Array | None = None, P: jax.Array | None = None, err: jax.Array | None = None, t: jax.Array | None = None, capacity: int = -1, size: int = -1, finished=False, invalid=False) TrajectoryInfo#
- __getitem__(slices)#
gets slice from indices. the output is truncated to the to include only items wihtin _size
- _stack(*ti: TrajectoryInfo)#
- __add__(ti: TrajectoryInfo) TrajectoryInfo#
- _expand_capacity(nc=None) TrajectoryInfo#
- _shrink_capacity() TrajectoryInfo#
- save(filename: str | pathlib.Path)#
- _save(hf: h5py.File)#
- static load(filename) TrajectoryInfo#
- static _load(hf: h5py.File)#
- property sp: IMLCV.base.CV.SystemParams#
- property volume#
- property shape#
- property CV: IMLCV.base.CV.CV | None#
- property CV_orig: IMLCV.base.CV.CV | None#
- class IMLCV.base.MdEngine.MDEngine#
Bases:
abc.ABCBase class for MD engine.
- bias: IMLCV.base.bias.Bias#
- energy: IMLCV.base.bias.Energy#
- static_trajectory_info: StaticMdInfo#
- trajectory_info: TrajectoryInfo | None#
- trajectory_file: pathlib.Path | None = None#
- nl: IMLCV.base.CV.NeighbourList | None = None#
- r_skin = 1.889726133921252#
- classmethod create(bias: IMLCV.base.bias.Bias, energy: IMLCV.base.bias.Energy, static_trajectory_info: StaticMdInfo, trajectory_info=None, trajectory_file=None, sp: IMLCV.base.CV.SystemParams | None = None, **kwargs) typing_extensions.Self#
- update_nl()#
- save(file)#
- new_bias(bias: IMLCV.base.bias.Bias, **kwargs) MDEngine#
- run(steps)#
run the integrator for a given number of steps.
- Parameters:
steps – number of MD steps
- abstract _run(steps)#
- get_trajectory() TrajectoryInfo#
- save_step(T=None, P=None, t=None, err=None, cv=None, e_bias=None, e_pot=None, gpos_rmsd=None, gpos_bias_rmsd=None, canonicalize=False)#
- get_energy(sp: IMLCV.base.CV.SystemParams, gpos: bool = False, vtens: bool = False, manual_vir=None) IMLCV.base.bias.EnergyResult#
- get_bias(sp: IMLCV.base.CV.SystemParams, gpos: bool = False, vtens: bool = False, shmap: bool = False, use_jac=False, push_jac=False, rel=False, shmap_kwargs=ShmapKwargs.create()) tuple[IMLCV.base.CV.CV, IMLCV.base.bias.EnergyResult]#
- __getstate__()#