pwtools.calculators.Lammps¶
- class pwtools.calculators.Lammps(**kwds)[source]¶
Bases:
FileIOCalculator
,CalculatorBase
LAMMPS calculator.
Only for single-point calculations, no MD, i.e. run a single energy+force calculation for the input structure.
Examples
Define a calculator object:
>>> calc = Lammps(label='lmp', >>> directory='/path/to/calculation/dir', ... pair_style='tersoff', ... pair_coeff='* * /path/to/potential/dir/AlN.tersoff Al N', ... command='lmp < lmp.in > lmp.out 2>&1', ... ) >>> at=crys.Structure(...).get_ase_atoms(pbc=True) >>> at.set_calculator(calc) >>> at.get_potential_energy()
Methods
Replace all placeholders in
self.infile_templ
.init_params_from_input
(kwds)Set
self.parameters = self.default_parameters
and update with input keyword arguments kwds.write_input
(atoms[, properties, system_changes])Attributes