mispr.lammps.workflows package

Submodules

mispr.lammps.workflows.base module

Define standard lammps workflows.

mispr.lammps.workflows.base.lammps_analysis_fws(analysis_list, analysis_settings, working_dir, **kwargs)[source]

Generate FireWorks for running LAMMPS analysis.

Parameters:
analysis_list : list

List of analysis types to perform. Supported types are: ‘diffusion’, ‘rdf’, ‘cn’, and ‘clusters’.

analysis_settings : list

List of dictionaries containing the settings for each analysis type.

working_dir : str

Directory where the data files will be written.

kwargs : keyword arguments

Additional keyword arguments.

Returns:

  • fireworks (list): List of FireWorks objects for running LAMMPS analysis.

  • links_dict (dict): Dictionary containing the links between the FireWorks.

Return type:

tuple

mispr.lammps.workflows.base.lammps_data_fws(system_species_data, system_mixture_type, box_data, box_data_type='cubic', data_file_name='complex.data', working_dir=None, db=None, tag='unknown', **kwargs)[source]

Generate FireWorks for writing LAMMPS data files.

Parameters:
system_species_data : dict

Dictionary containing species data. The keys are the species labels and the values are dictionaries containing the following keys:

  • molecule (Molecule, GaussianOutput, str, dict): Source of the molecule to be processed. See process_mol in mispr/gaussian/utilities/mol.py for supported operations.

  • molecule_operation_type (str): Type of molecule operation. Must match with molecule value.

  • ff_param_method (str): Method for obtaining force field parameters. Must match with ff_param_data value. See available methods for GetFFDictFw in mispr/lammps/fireworks/core.py.

  • ff_param_data (str or dict): Data regarding necessary information to obtain ff parameters. Must match with ff_param_method value.

  • mol_mixture_type (str): Type of mixture data. Must be “Solutes” or “Solvents”.

  • mixture_data (int or dict): Information regarding the number of molecules of this type in the system. Depends on the system_mixture_type parameter.

system_mixture_type : str

Type of mixture data. Must be “concentration” or “number of molecules”. See LammpsDataWrapper in pymatgen/io/lammps/data.py for more information.

box_data : float, int, list (3,2), array (3,2), or LammpsBox

Definitions for box size. See box_data_type for info how to define this parameter.

box_data_type : str, optional

Determines the value of the box_data parameter. Can be one of the following: ‘cubic’, ‘rectangular’, or ‘LammpsBox’. If ‘cubic’, box_data must be a float or int; if ‘rectangular’, box_data must be an array-like with size (3,2); if ‘LammpsBox’, box_data must be a LammpsBox object. Defaults to ‘cubic’.

data_file_name : str, optional

Name of the data file to be written. Defaults to “complex.data”.

working_dir : str, optional

Directory where the data files will be written. Defaults to the current working directory.

db : str or dict, optional

Database credentials. Could be a string with the path to the database file or a dictionary with the database credentials. If none is provided, attempts to read the configuration files. Only used when save_ff_to_db is True.

tag : str, optional

Tag for the Fireworks. Defaults to “unknown”.

kwargs : keyword arguments

Additional keyword arguments.

Returns:

List of FireWorks for writing LAMMPS data files.

Return type:

fireworks (list)

mispr.lammps.workflows.base.lammps_run_fws(recipe=[['emin', ['template_filename', 'emin_gaff']], ['npt', ['template_filename', 'npt']], ['melt', ['template_filename', 'nvt']], ['quench', ['template_filename', 'nvt']], ['nvt', ['template_filename', 'nvt']]], recipe_settings=[{'data_filename': '../data.mixture', 'restart_finalname': 'restart.emin'}, {'restart_filename': '../emin/restart.emin', 'restart_final_filename': 'restart.npt'}, {'restart_filename': '../npt/restart.npt', 'temperature_initial': 500.0, 'temperature_final': 500.0, 'run': 2000000, 'restart_final_filename': 'restart.melt_500K', 'data_final_filename': 'data.melt'}, {'restart_filename': '../melt/restart.melt_500K', 'temperature_initial': 500.0, 'temperature_final': 298.15, 'run': 3000000, 'restart_final_filename': 'restart.quench_298K', 'data_final_filename': 'data.quench_298K'}, {'restart_filename': '../quench/restart.quench_298K', 'temperature_initial': 298.15, 'temperature_final': 298.15, 'run': 5000000, 'restart_final_filename': 'restart.nvt_5ns', 'data_final_filename': 'data.nvt_5ns'}], recipe_qadapter=[{'walltime': '00:10:00', 'job_name': 'emin'}, {'walltime': '08:00:00', 'job_name': 'npt'}, {'walltime': '08:00:00', 'job_name': 'melt'}, {'walltime': '12:00:00', 'job_name': 'quench'}, {'walltime': '48:00:00', 'job_name': 'nvt'}], init_spec=None, db=None, working_dir=None, save_runs_to_db=True, save_runs_to_file=False, **kwargs)[source]

Generate FireWorks for running LAMMPS simulations.

Parameters:
recipe : list, optional

List of lists containing the name of the step and the template filename or string for the LAMMPS input file. Defaults to LAMMPS_RECIPE.

recipe_settings : list, optional

List of dictionaries containing the settings for each step in the recipe. Defaults to RECIPE_SETTINGS.

recipe_qadapter : list, optional

List of dictionaries containing the settings for the queue adapter for each step in the recipe. Defaults to QADAPTER_RUN_LAMMPS_SPEC.

init_spec : dict, optional

Initial spec for the FireWorks. Defaults to None.

db : str or dict, optional

Database credentials. Could be a string with the path to the database file or a dictionary with the database credentials. If none is provided, attempts to read the configuration files. Only used when save_runs_to_db is True.

working_dir : str, optional

Directory where the data files will be written. Defaults to the current working directory.

save_runs_to_db : bool, optional

Whether to save the runs to the database. Defaults to True.

save_runs_to_file : bool, optional

Whether to save the runs to a file. Defaults to False.

kwargs : keyword arguments

Additional keyword arguments.

Returns:

List of FireWorks for running LAMMPS simulations.

Return type:

fireworks (list)

mispr.lammps.workflows.base.lammps_workflow(system_species_data=None, system_mixture_type=None, box_data=None, box_data_type='cubic', data_file_name='data.mixture', recipe=[['emin', ['template_filename', 'emin_gaff']], ['npt', ['template_filename', 'npt']], ['melt', ['template_filename', 'nvt']], ['quench', ['template_filename', 'nvt']], ['nvt', ['template_filename', 'nvt']]], recipe_settings=[{'data_filename': '../data.mixture', 'restart_finalname': 'restart.emin'}, {'restart_filename': '../emin/restart.emin', 'restart_final_filename': 'restart.npt'}, {'restart_filename': '../npt/restart.npt', 'temperature_initial': 500.0, 'temperature_final': 500.0, 'run': 2000000, 'restart_final_filename': 'restart.melt_500K', 'data_final_filename': 'data.melt'}, {'restart_filename': '../melt/restart.melt_500K', 'temperature_initial': 500.0, 'temperature_final': 298.15, 'run': 3000000, 'restart_final_filename': 'restart.quench_298K', 'data_final_filename': 'data.quench_298K'}, {'restart_filename': '../quench/restart.quench_298K', 'temperature_initial': 298.15, 'temperature_final': 298.15, 'run': 5000000, 'restart_final_filename': 'restart.nvt_5ns', 'data_final_filename': 'data.nvt_5ns'}], recipe_qadapter=[{'walltime': '00:10:00', 'job_name': 'emin'}, {'walltime': '08:00:00', 'job_name': 'npt'}, {'walltime': '08:00:00', 'job_name': 'melt'}, {'walltime': '12:00:00', 'job_name': 'quench'}, {'walltime': '48:00:00', 'job_name': 'nvt'}], db=None, working_dir=None, analysis_list=None, analysis_settings=None, name='lammps_workflow', **kwargs)[source]

Create a LAMMPS workflow.

Parameters:
system_species_data : dict, optional

Dictionary containing species data. Refer to the lammps_data_fws function for more information. Defaults to None. If not provided, the workflow will not create any FireWorks for writing LAMMPS data files.

system_mixture_type : str

Type of mixture data. Must be “concentration” or “number of molecules”. See LammpsDataWrapper in pymatgen/io/lammps/data.py for more information. Defaults to None. If not provided, the workflow will not create any FireWorks for writing LAMMPS data files.

box_data : float, int, list (3,2), array (3,2), or LammpsBox

Definitions for box size. See lammps_data_fws for info on how to define this parameter. Defaults to None. If not provided, the workflow will not create any FireWorks for writing LAMMPS data files.

box_data_type : str, optional

Determines the value of the box_data parameter. Defaults to ‘cubic’.

data_file_name : str, optional

Name of the data file to be written. Defaults to ‘data.mixture’.

recipe : list, optional

List of lists containing the name of the step and the template filename or string for the LAMMPS input file. Defaults to LAMMPS_RECIPE.

recipe_settings : list, optional

List of dictionaries containing the settings for each step in the recipe. Defaults to RECIPE_SETTINGS.

recipe_qadapter : list, optional

List of dictionaries containing the settings for the queue adapter for each step in the recipe. Defaults to QADAPTER_RUN_LAMMPS_SPEC.

db : str or dict, optional

Database credentials. Could be a string with the path to the database file or a dictionary with the database credentials. If none is provided, attempts to read the configuration files. Only used when save_runs_to_db is True. Defaults to None.

working_dir : str, optional

Directory where the data files will be written. Defaults to the current working directory.

analysis_list : list, optional

List of analysis types to perform. Supported types are: ‘diffusion’, ‘rdf’, ‘cn’, and ‘clusters’. Defaults to None. If not provided, the workflow will not create any FireWorks for running LAMMPS analysis.

analysis_settings : list, optional

List of dictionaries containing the settings for each analysis type. Defaults to None. If not provided, the workflow will not create any FireWorks for running LAMMPS analysis.

name : str, optional

Name of the workflow. Defaults to ‘lammps_workflow’.

kwargs : keyword arguments

Additional keyword arguments.

Returns:

Workflow

Module contents