ichor.core.molecular_dynamics package
Submodules
ichor.core.molecular_dynamics.amber module
- class AmberMDIn(path: Path, nsteps: int = FileContents, dt: float = FileContents, temperature: int = FileContents, force_evaluation: ForceEvaluation = FileContents, bond_constraint: BondLengthConstraint = FileContents, write_coordinates_every: int = FileContents, write_velocities_every: int = FileContents, write_forces_every: int = FileContents, periodic_boundary_condition: PeriodicBoundaryCondition = FileContents, thermostat: AmberThermostat = FileContents, ln_gamma: float = FileContents)
-
Class that handles amber input files mdin.d
- Parameters:
mdin_file – File where to write data
nsteps – Number of timesteps to run simulation for
dt – Timestep time in picoseconds, default is 0.001
temperature – Temperature to perform simulation at, default is 300
force_evaluation – _description_, defaults to ForceEvaluation.Complete
bond_constraint – _description_, defaults to BondLengthConstraint.NoConstraint
write_coordinates_every – Write coordinates every nth timestep, defaults to 1
write_velocities_every – Write velocities out to mdcrd even nth step Note that these should not be written out as output format ioutfm is set to 0 (meaning output is not in binary format), optional
write_forces_every – Write atomic forces out to mdcrd every nth step Note that output file is not NETCDF (binary format), defaults to -1
periodic_boundary_condition – Whether to use periodic boundary conditions or not, defaults to PeriodicBoundaryCondition.NoPeriodicBoundary
thermostat – The thermostat to use for the simulation, defaults to AmberThermostat.Langevin
ln_gamma – The collision frequency in picoseconds, defaults to 0.5
- path: Path | str
- class AmberThermostat(value)
Bases:
EnumAn enumeration.
- Andersen = 2
- ConstantEnergy = 0
- ConstantTemperature = 1
- Langevin = 3
- OptimisedIsokineticNoseHoover = 9
- StochasticIsokineticNoseHoover = 10
- class BondLengthConstraint(value)
Bases:
EnumAn enumeration.
- AllBonds = 3
- HydrogenBonds = 2
- NoConstraint = 1
- class ForceEvaluation(value)
Bases:
EnumAn enumeration.
- Complete = 1
- OmitAll = 8
- OmitAngle = 5
- OmitBonds = 3
- OmitDihedral = 7
- OmitHAngle = 4
- OmitHBonds = 2
- OmitHDihedral = 6
- class PeriodicBoundaryCondition(value)
Bases:
EnumAn enumeration.
- ConstantPressure = 2
- ConstantVolume = 1
- NoPeriodicBoundary = 0
- mdcrd_to_xyz(mdcrd: str | Path, prmtop: str | Path, mdin: str | Path, system_name: str, every: int = 1)
- write_mdin(mdin_file: Path, nsteps: int, dt: float = 0.001, temperature: int = 300, force_evaluation: ForceEvaluation = ForceEvaluation.Complete, bond_constraint: BondLengthConstraint = BondLengthConstraint.NoConstraint, write_coordinates_every: int = 1, write_velocities_every: int = 0, write_forces_every: int = 0, periodic_boundary_condition: PeriodicBoundaryCondition = PeriodicBoundaryCondition.NoPeriodicBoundary, thermostat: AmberThermostat = AmberThermostat.Langevin, ln_gamma: float = 0.5)
Writes an AMBER md.in file with the given settings
- Parameters:
mdin_file – File where to write data
nsteps – Number of timesteps to run simulation for
dt – Timestep time in picoseconds, default is 0.001
temperature – Temperature to perform simulation at, default is 300
force_evaluation – _description_, defaults to ForceEvaluation.Complete
bond_constraint – _description_, defaults to BondLengthConstraint.NoConstraint
write_coordinates_every – Write coordinates every nth timestep, defaults to 1
write_velocities_every – Write velocities out to mdcrd even nth step Note that these should not be written out as output format ioutfm is set to 0 (meaning output is not in binary format), optional
write_forces_every – Write atomic forces out to mdcrd every nth step Note that output file is not NETCDF (binary format), defaults to -1
periodic_boundary_condition – Whether to use periodic boundary conditions or not, defaults to PeriodicBoundaryCondition.NoPeriodicBoundary
thermostat – The thermostat to use for the simulation, defaults to AmberThermostat.Langevin
ln_gamma – The collision frequency in picoseconds, defaults to 0.5
ichor.core.molecular_dynamics.cp2k module
- class CP2KInput(path: Path, atoms: Atoms | None = None, temperature: float = FileContents, nsteps: int = FileContents, datafile_location: Path = FileContents, project_name: str = FileContents, method: str = 'BLYP', basis_set: str = '6-31G*', molecular_charge: int = 0, spin_multiplicity: int = 1, solver: str = 'periodic', n_molecules: int = 1, box_size: float = 25.0)
Bases:
ReadFile,WriteFile,HasAtomsCP2K inpuit file reading/writing class.
- Parameters:
path – path of CP2K .inp file
atoms – Atoms instance which is the starting geometry, defaults to None
temperature – Temperature of CP2K simulation, defaults to FileContents
nsteps – Timesteps of simulation, defaults to FileContents
datafile_location – The location of a file containing CP2K data. This has nothing to do with the datafile that ICHOR uses to submit jobs , defaults to FileContents
project_name – The name of the system/project, defaults to FileContents
method – The method to use for the DFT simulation, defaults to “BLYP”
basis_set – Basis set to use for simulation, defaults to “6-31G*”
molecular_charge – Charge of system, defaults to 0
n_molecules – Number of molecules, defaults to 1
box_size – Box size of simulation, defaults to 25.0
- path: Path | str
- write_cp2k_input(cp2k_input_file: Path, atoms: Atoms, temperature: int, nsteps: int, datafile_location: Path, system_name: str, method: str = 'BLYP', basis_set: str = '6-31G*', molecular_charge: int = 0, spin_multiplicity: int = 1, solver: str = 'periodic', n_molecules: int = 1, box_size: float = 25.0)