acemd.acemd module#
- class acemd.acemd.FGROUPS(value)#
Bases:
EnumAn enumeration.
- ANGLES = 1#
- BAROSTAT = 14#
- BONDS = 0#
- CMAP = 5#
- DEBUG = 18#
- DIHEDRALS = 2#
- EXTERNAL = 19#
- IMPLICIT = 16#
- IMPROPER = 4#
- NNP = 17#
- NONBONDED = 11#
- PLUMED = 15#
- UREYBRADLEY = 3#
- acemd.acemd.acemd(directory: Path, inputfile=None, dump_simulation_xml=False, **kwargs)#
Run an ACEMD molecular-dynamics simulation in a directory.
Reads an input file (YAML or JSON) from
directory, optionally overrides any input-file option viakwargs, runs minimization (ifminimize > 0) followed by the production loop, and writes trajectory, log, and restart files intodirectory.- Parameters:
directory (Path) – Working directory. The input file, structure / parameters / coordinates referenced by it, and all simulation output live here.
inputfile (str or Path, optional) – Name of the input file inside
directory. IfNone,input.yaml(orinput.json) is auto-detected.dump_simulation_xml (bool, optional) – Write the fully constructed OpenMM
Systemtosimulation.xmlfor inspection / debugging.**kwargs – Any input-file option (lowercase) or CLI flag, overriding the corresponding value from
inputfile. See the ACEMD documentation for the full option list.
- Returns:
simulation – The simulation object after the run completes.
- Return type:
openmm.app.Simulation
Examples
>>> from acemd import acemd >>> acemd("/tmp/my_simulation") >>> acemd("/tmp/my_simulation", run="2ns", device=[0, 1])
- acemd.acemd.get_acemd_system(directory: Path, inputfile=None, include_extforces=False, set_velocities=False, **kwargs)#
- acemd.acemd.get_energy_decomposition(context, state)#
- acemd.acemd.get_sim_properties(context, totalMass, dof)#
- acemd.acemd.load_molecule(filename, mol=None)#
- acemd.acemd.print_energy_decomposition(energy_terms)#
- acemd.acemd.run(directory, simulation, nsteps: int = 0, extforces: list = (), period=25000, velocities=298.15, dump_simulation_xml=False, stepzero=False)#
- acemd.acemd.setup_acemd(platform: str = 'CUDA', device: list[int] | None = None, precision: str = 'mixed', structure: Path | None = None, pme: bool = True, cutoff: float = 9.0, switching: bool = True, switchdistance: float = 7.5, implicitsolvent: bool = False, igb: int = 2, extforces: list[str] | None = None, fbrefcoor: Path | None = None, plumedfile: Path | None = None, coordinates: Path | None = None, boxsize: list[float] | Path | None = None, velocities: Path | float | None = 298.15, timestep: float = 4.0, slowperiod: int = 1, thermostat: bool = False, thermostattemperature: float = 298.15, thermostatdamping: float = 1, barostat: bool = False, barostatpressure: float = 1.0, barostatanisotropic: bool = False, barostatconstratio: bool = False, barostatconstxy: bool = False, trajectoryfile: str = 'output.xtc', trajvelocityfile: str | None = None, trajforcefile: str | None = None, trajectoryperiod: int = 25000, restart: bool = False, parameters: Path | None = None, run=0, minimize=0, directory='.', include_extforces: bool = False, set_velocities: bool = True, stepzero: bool = False, deterministic: bool = False, rfdielectric: float = 78.5, ncpus: int | None = None, nnp: dict | None = None, hydrogenmass: float = 4.032, hmr: bool | None = None, hbondconstr: bool | None = None, rigidwater: bool | None = None, molecules: dict | None = None, protonate: bool | float = False)#
- acemd.acemd.setup_barostat(thermostat, barostatanisotropic, barostatconstratio, barostatconstxy, barostatpressure, thermostattemperature, system)#