class LammpsInputSet(name, lammps_input, lammps_data=None, data_filename='', user_lammps_settings=None)[source]

Bases: monty.json.MSONable

Implementation of LammpsInputSet that is initialized from a dict settings. It is typically used by other LammpsInputSets for initialization from json or yaml source files.

  • name (str) – A name for the input set.
  • lammps_input (LammpsInput) – The config dictionary to use.
  • lammps_data (LammpsData) – LammpsData object
  • data_filename (str) – name of the the lammps data file. Note: this will override the value for ‘data_file’ key in lammps_input
  • user_lammps_settings (dict) – User lammps settings. This allows a user to override lammps settings, e.g., setting a different force field or bond type.

A JSON serializable dict representation of an object.

classmethod from_dict(d)[source]
classmethod from_file(name, input_template, user_settings, lammps_data=None, data_filename='')[source]

Returns LammpsInputSet from input file template and input data.

  • name (str) –
  • input_template (string) – path to the input template file.
  • user_settings (dict) – User lammps settings, the keys must correspond to the keys in the template.
  • lammps_data (string/LammpsData) – path to the data file or an appropriate object
  • data_filename (string) – name of the the lammps data file.


write_input(input_filename, data_filename=None)[source]

Get the string representation of the main input file and write it. Also writes the data file if the lammps_data attribute is set.

  • input_filename (string) – name of the input file
  • data_filename (string) – override the data file name with this