atomate.lammps.firetasks package

Submodules

atomate.lammps.firetasks.glue_tasks module

class atomate.lammps.firetasks.glue_tasks.CopyPackmolOutputs(*args, **kwargs)

Bases: atomate.common.firetasks.glue_tasks.CopyFiles

Copy files from a previous run directory to the current directory. Note: must specify either “calc_loc” or “calc_dir” to indicate the directory

containing the files to copy.

Optional params:
calc_loc (str OR bool): if True will set most recent calc_loc. If str

search for the most recent calc_loc with the matching name.

calc_dir (str): path to dir that contains VASP output files. filesystem (str): remote filesystem. e.g. username@host exclude_files (list): list fo filenames to be excluded when copying.

NOte: by default nothing is excluded.

optional_params = ['calc_loc', 'calc_dir', 'filesystem', 'exclude_files']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

atomate.lammps.firetasks.parse_outputs module

atomate.lammps.firetasks.run_calc module

This module defines firetasks for running lammps

class atomate.lammps.firetasks.run_calc.RunLammpsDirect(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Run LAMMPS directly (no custodian).

Required params:
lammsps_cmd (str): lammps command to run sans the input file name.

e.g. ‘mpirun -n 4 lmp_mpi’

required_params = ['lammps_cmd', 'input_filename']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.lammps.firetasks.run_calc.RunLammpsFake(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Pretend run i.e just copy files from existing run dir.

Required params:

ref_dir (str): path to the reference dir

required_params = ['ref_dir']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.lammps.firetasks.run_calc.RunPackmol(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Run packmol.

Required params:

molecules (list): list of constituent molecules(Molecule objects) packing_config (list): list of dict config settings for each molecule in the

molecules list. eg: config settings for a single moelcule [{“number”: 1, “inside box”:[0,0,0,100,100,100]}]

Optional params:

tolerance (float): packmol tolerance filetype (string): input/output structure file type control_params (dict): packmol control parameters dictionary. Basically all parameters other

than structure/atoms

output_file (str): output file name. The extension will be adjusted according to the filetype site_property (str): the specified site property will be restored for the final Molecule object.

optional_params = ['tolerance', 'filetype', 'control_params', 'output_file', 'site_property']
required_params = ['molecules', 'packing_config', 'packmol_cmd']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

atomate.lammps.firetasks.write_inputs module

This module defines firetasks for writing LAMMPS input files (data file and the control parameters file)

class atomate.lammps.firetasks.write_inputs.WriteInputFromForceFieldAndTopology(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

optional_params = ['data_filename', 'user_settings', 'ff_site_property']
required_params = ['input_file', 'final_molecule', 'constituent_molecules', 'mols_number', 'box_size', 'forcefield', 'topologies', 'input_filename']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.lammps.firetasks.write_inputs.WriteInputFromIOSet(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Writes LAMMPS Input files(data file and the control parameters file) from DictLammpsInput.

required_params:

lammps_input_set (LammpsInputSet) input_file (string): name of the file to which the input params will be written

optional_params:

data_filename (string): if specified the data file will be renamed

optional_params = ['data_filename']
required_params = ['lammps_input_set', 'input_filename']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

Module contents