Engine¶
The LAMMPS engine for SimPhoNy (LammpsWrapper in module
simlammps.lammps_wrapper) implements the SimPhoNy’s abstract interface
definition for engines (ABCModelingEngine). This LAMMPS engine is available
through the engine plug-in to the SimPhoNy library.
Engine
LammpsWrapper([engine_type, ...]) |
Wrapper to LAMMPS-md |
Implementation
LAMMPS SimPhoNy Wrapper
This module provides a wrapper for LAMMPS-md
-
class
simlammps.lammps_wrapper.EngineType¶ Bases:
enum.IntEnum-
DEM= <EngineType.DEM: 1>¶
-
MD= <EngineType.MD: 0>¶
-
-
class
simlammps.lammps_wrapper.LammpsWrapper(engine_type=<EngineType.MD: 0>, use_internal_interface=False)¶ Bases:
simphony.cuds.abc_modeling_engine.ABCModelingEngineWrapper to LAMMPS-md
-
add_dataset(container)¶ Add a CUDS container
Parameters: container ({ABCParticles}) – The CUDS container to add to the engine.
Raises: - TypeError: – If the container type is not supported (i.e. ABCLattice, ABCMesh).
- ValueError: – If there is already a dataset with the given name.
-
get_dataset(name)¶ Get the dataset
The returned particle container can be used to query and change the related data inside LAMMPS.
Parameters: name (str) – name of CUDS container to be retrieved. Returns: A proxy of the dataset named namethat is stored internally in the Engine.Return type: container Raises: ValueError: – If there is no dataset with the given name
-
get_dataset_names()¶ Returns the names of all the datasets
-
iter_datasets(names=None)¶ Returns an iterator over a subset or all of the containers.
Parameters: names (sequence of str, optional) – names of specific containers to be iterated over. If names is not given, then all containers will be iterated over.
-
remove_dataset(name)¶ Remove a dataset
Parameters: name (str) – name of CUDS container to be deleted Raises: ValueError: – If there is no dataset with the given name
-
run()¶ Run lammps-engine based on configuration and data
-