Parameters#
The behavior of the aiida-lammps
calculation can be controlled by collecting LAMMPS simulation parameters in a dictionary
parameters = {
'md': {
'velocity': [{'group': 'all', 'create': {'temp': 300}}],
'integration': {
'style': 'npt',
'constraints': {'iso': [0.0, 0.0, 1000.0], 'temp': [300, 300, 100]}
},
'max_number_steps': 5000
},
'dump': {'dump_rate': 1000},
'thermo': {
'printing_rate': 100,
'thermo_printing': {
'ke': True,
'pe': True,
'pxx': True,
'pyy': True,
'pzz': True,
'step': True,
'press': True
}
},
'compute': {
'ke/atom': [{'type': [{'value': ' ', 'keyword': ' '}], 'group': 'all'}],
'pe/atom': [{'type': [{'value': ' ', 'keyword': ' '}], 'group': 'all'}],
'pressure': [{'type': ['thermo_temp'], 'group': 'all'}],
'stress/atom': [{'type': ['NULL'], 'group': 'all'}]
},
'control': {'units': 'metal', 'timestep': 1e-05},
'structure': {'atom_style': 'atomic'}
}
The dictionary is separated into several nested dictionaries that control different behaviors of the LAMMPS simulation:
control
: takes keywords specifying global simulation parameters:timestep
: time step used in the simulation, it depends on the units used (default: LAMMPS default dependent on units parameter).newton
: it controls whether the Newton’s third law is turned on or off for the calculation (default:on
).processors
: specifies how processors are mapped to the simulation box (default: ignore the command).
structure
: variables controlling structure options:box_tilt
: determines how skewed the cell is, of great importance for triclinic systems (default:small
).groups
: list with the names of the groups to be added. The names of the possible groups are generated by the list of possible kind names generated by the structure (default: skip parameter).atom_style
: how the atoms are treated by theLAMMPS
simulation.boundary
: allows to override the boundary conditions as set by the AiiDA structure as they can be incompatible with whatLAMMPS
expects.dimension
: allows to override the dimension as determined by the AiiDA structure as it is determined by the boundary conditions and this is not whatLAMMPS
expects.
potential
: parameters related to the potential describing the system:potential_style_options
: extra parameters related to each of the possible pair styles (default: skip parameter).neighbor
: sets the parameters affecting the construction of the neighbor list (default: skip parameter).neighbor_modify
: set of options that modify the pairwise neighbor list generation (default: skip parameter).
dump
: controls parameters regarding the printing of the site dependent quantities:dump_rate
: how often are the site dependent quantities printed to file (default: 10).
compute
: set of lists containing information about which LAMMPS computes should be calculated. For each LAMMPS command one passes a list of dictionaries, each dictionary has atype
key containing the options of the compute andgroup
a key specifying over which group the compute is acting on.fix
: set of list containing information about which LAMMPS fixes should be calculated. For each LAMMPS command one passes a list of dictionaries, each dictionary has atype
key containing the options of the fixes andgroup
a key specifying over which group the fix is acting on.thermo
: set of variables indicating which global parameters (printed in thelammps.out
) should be printed:md
: set of variables controlling a molecular dynamics simulation (exclusionary withminimize
key word):max_number_steps
: maximum number of steps for the molecular dynamics simulation (default: 100)run_style
: type of molecular dynamics algorithm (default:verlet
).velocity
: set of variables needed to define the velocity of the system.integration
: parameters relating to the integrators of the molecular dynamics simulation:style
: Type of integrator used for the molecular dynamics simulation.constraints
: set of options for each integrator, the values depend on the type of integrator.
minimize
: set of variables controlling a minimization simulation (exclusionary withmd
key word):style
: type of minimization algorithm (default:cg
).energy_tolerance
: tolerance for the energy minimization (default: 1e-4).force_tolerance
: tolerance for the force minimization (default: 1e-4).max_iterations
: maximum number of iterations (default: 1000).max_evaluations
: maximum number of evaluations (default: 1000).
restart
: set of variables controlling the printing of the binary file to restart a LAMMPS calculation.print_final
: whether or not to print a restart file at the end of the calculation, equivalent to setting write_restart at the end of the calculation (default:False
).print_intermediate
: whether or not to print restart files throughout the run at regular intervals, equivalent to the restart LAMMPS command (default:False
).num_steps
: however often the restart file is written ifprint_intermediate
is used (default:max_number_steps*0.1
).
Note
As the restart files can be very large, they are by default not printed, nor stored in the database. Even when one prints them with the print_final
and/or print_intermediate
they are not retrieved and are only kept in the remote folder. The storage of the restart file can be controlled via the store_restart=True
(store_restart=False
) to store(not-store) option in the settings
dictionary.
Compute parameters#
When asking aiida-lammps
to calculate a certain compute
its LAMMPS name will be automatically generated following the pattern compute_name_group_name_aiida
where compute_name
is the LAMMPS
name of the compute, e.g. pe/atom
with the difference than the /
character is replaced by _
and group_name
is the name of the group to which the compute is applied. All global computes are printed to the lammps.out
and all site dependent quantities are printed to the trajectory file. These computes can then be accessed as outputs of the simulation.
Input validation#
LAMMPS has a quite large amount of possible parameters which can be passed into it to control its behavior. Many of these options are incompatible which can cause the LAMMPS simulation to fail. To try to catch as many as possible of these possible conflicts the aiida-lammps
input is validated against a JSON schema, that checks that the provided input parameters fulfill this schema as much as possible, e.g. it checks that only LAMMPS computes can be passed to the compute
block, etc. Due to the large amount and variety of options for each compute/fixes these options are not thoroughly checked, only the name of the compute itself is checked.