espressomd.plugins package¶
Submodules¶
espressomd.plugins.ase module¶
- class espressomd.plugins.ase.ASEInterface(system: System, type_mapping: dict | None, particle_slice: ParticleSlice, export_charges: bool = False, export_masses: bool = False, export_momenta: bool = False, assume_constant_charges: bool = False, assume_constant_masses: bool = False, assume_constant_types: bool = False, use_folded_positions: bool = True)[source]¶
Bases:
objectInterface for ASE [Hjorth Larsen et al., 2017] with calculator support.
- integrate(steps: int, calculator) int[source]¶
Integrate the system for the specified number of steps.
For each step:
Update ASE with current particle data
Get forces from calculator
Set external forces on particles
Run one integration step
Since the particle property
ext_forceis updated at every time step, cache invalidation is inevitable, and the symplectic Euler method is needed to conserve momentum (espressomd.integrate.SymplecticEuler).- Parameters:
steps (
int) – Number of integration steps to perform.calculator (
ase.calculators.calculator.Calculator) – ASE calculator to use for force calculations.
- Returns:
Number of steps actually performed
- Return type:
int
- reset()[source]¶
Re-create the ASE atoms object using ESPResSo system properties.
New ASE atom objects are created from the current particle slice with positions, types, periodicity and box dimensions. If export flags are set, charges, masses, and/or momenta are also initialized. If type_mapping is
None, atoms are created without symbols.