LAMMPS#
Usage#
To use LAMMPS as an engine, follow these steps:
Acquire and compile LAMMPS, following the LAMMPS build guide. You will need to enable the USER-MDI package when building LAMMPS. Prepare a LAMMPS input file that specifies the initial molecular geometry of the system, the force field to be used, and any other desired settings. At the end of the input file, call the mdi/engine command, which does not accept any arguments. For example:
units real
neigh_modify delay 0 every 1 check yes
atom_style full
bond_style harmonic
angle_style harmonic
pair_style lj/cut/coul/long 10.0
pair_modify mix arithmetic
kspace_style pppm 1e-4
special_bonds amber
atom_modify sort 0 0
read_data lammps.data
timestep 1.0
dump 1 all custom 1 dump.lammpstrj id element xu yu zu
dump 2 all custom 1 dump.force id element fx fy fz
dump 3 all xyz 1 dump.xyz
dump_modify 1 element O H
dump_modify 2 element O H
thermo_style multi
thermo 1
fix 1 all nvt temp 300.0 300.0 70.0
fix 2 all shake 0.0001 20 0 b 1 a 1
mdi/engine
Launch LAMMPS using the “-mdi” runtime option, which is described in Launching Codes with the MDI Library. For example:
lammps -in lammps.in -mdi "-role ENGINE -name my_name -method TCP -port 8021 -hostname localhost" &
MDI Mechanic LAMMPS report#
This repo presents test results for the MDI interface implementation in the LAMMPS code.
To view the README.md offline, it is suggested that you use grip (i.e., pip install grip
).
Basic Functionality Tests#
This section provides the results of several tests performed by MDI Mechanic that are intended to verify that this engine meets the most basic requirements of MDI. Any functioning MDI engine must successfully pass all of these tests. The tests are performed in the listed order, and a failure for one test causes all subsequent tests to be skipped and marked as failed.
Developers seeking to implement or maintain MDI support in an engine should resolve the first failed test (if any) and then generate a new report in order to confirm that the test is passed successfully. Additional information about each test, as well as advice on how to resolve a test if it fails, can be obtained by clicking the test’s status badge. If all of these tests are succussfull, developers are encouraged to begin implementing support for any additional MDI nodes and MDI commands that are appropriate for the engine.
Nodes#
The graph indicates which nodes have been implemented in this engine and the connections between them.
Commands#
The following table indicates which MDI Standard commands are supported by this engine at each node. Supported commands are indicated in green, while unsupported commands are indicated in gray.
Supported Commands#
@COORDS |
@DEFAULT |
@ENDSTEP |
@FORCES |
@INIT_MD |
@INIT_OPTG |
|
---|---|---|---|---|---|---|
<@ |
||||||
<CELL |
||||||
<CELL_DISPL |
||||||
<CHARGES |
||||||
<COORDS |
||||||
<DIMENSIONS |
||||||
<ELEC_MULT |
||||||
<ELEMENTS |
||||||
<ENERGY |
||||||
<FORCES |
||||||
<KE |
||||||
<KE_ELEC |
||||||
<KE_NUC |
||||||
<MASSES |
||||||
<NAME |
||||||
<NATOMS |
||||||
<PE |
||||||
<PE_ELEC |
||||||
<PE_NUC |
||||||
<STRESS |
||||||
<TOTCHARGE |
||||||
<VELOCITIES |
||||||
>+FORCES |
||||||
>CELL |
||||||
>CELL_DISPL |
||||||
>CHARGES |
||||||
>COORDS |
||||||
>ELEC_MULT |
||||||
>ENERGY |
||||||
>FORCES |
||||||
>MASSES |
||||||
>STRESS |
||||||
>TOTCHARGE |
||||||
>VELOCITIES |
||||||
@ |
||||||
@INIT_MC |
||||||
@INIT_MD |
||||||
@INIT_OPTG |
||||||
EXIT |
Acknowledgements#
Badges are obtained from the project.