Skip to content

Commit

Permalink
Update docstrings for lammps fireworks
Browse files Browse the repository at this point in the history
  • Loading branch information
rashatwi committed Apr 18, 2024
1 parent 71743cc commit 8fa2d23
Showing 1 changed file with 51 additions and 63 deletions.
114 changes: 51 additions & 63 deletions mispr/lammps/fireworks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

def ambertools_tasks(**kwargs):
"""
Define a list of common tasks for generating GAFF parameters for a
molecule. This is a helper function for the GetFFDictFW Firework.
Define a list of common tasks for generating GAFF parameters for a molecule. This is
a helper function for the GetFFDictFW Firework.
Args:
kwargs: other kwargs that are passed to:
Expand Down Expand Up @@ -122,27 +122,23 @@ def __init__(
):
"""
Args:
mol (Molecule, GaussianOutput, str, dict): Source of the
molecule to be processed. Should match the
``mol_operation_type``.
mol_operation_type (str): The type of molecule operation.
See process_mol defined in
``mispr/gaussian/utilities/mol.py`` for supported
operations.
data (str, dict): Data to be processed, e.g. path to the
esp file if operation_type is 'get_from_esp'; path to
the prmtop file if operation_type is 'get_from_prmtop';
etc.
operation_type (str, optional): The operation to perform on
the data to read or generate the force field parameters.
Defaults to ``get_from_esp``. Supported commands:
1. 'get_from_esp': If the input is an ESP file.
2. 'get_from_prmtop': If the input is a prmtop file.
3. 'get_from_opls': If the input is a molecule file to
be used to generate opls ff parameters.
4. 'get_from_dict': If the input is a dictionary of
force field parameters. e.g.
mol (Molecule, GaussianOutput, str, dict): Source of the molecule to be
processed. Should match the ``mol_operation_type``.
mol_operation_type (str): The type of molecule operation. See ``process_mol``
defined in ``mispr/gaussian/utilities/mol.py`` for supported operations.
data (str, dict): Data to be processed, e.g., path to the esp file if
``operation_type`` is ``get_from_esp``, path to the prmtop file if
``operation_type`` is ``get_from_prmtop``, etc.
operation_type (str, optional): The operation to perform on the data to read
or generate the force field parameters. Defaults to ``get_from_esp``.
Supported commands:
1. ``get_from_esp``: If the input is an ESP file.
2. ``get_from_prmtop``: If the input is a prmtop file.
3. ``get_from_opls``: If the input is a molecule file to be used to
generate opls ff parameters.
4. ``get_from_dict``: If the input is a dictionary of force field
parameters. e.g.,
.. code-block:: python
Expand All @@ -157,35 +153,31 @@ def __init__(
"Improper Topologies": improper_topologies,
"Charges": charges}
5. 'get_from_file': If the input is a json file of the
force field parameters.
6. 'get_from_db': If the input is a filter for the
database to search for the force field parameters.
5. 'get_from_file': If the input is a json file of the force field
parameters.
6. 'get_from_db': If the input is a filter for the database to search
for the force field parameters.
label (str, optional): Label for the molecule. This should
be unique for each different molecular species in the
system. Defaults to an empty string. In this case, the
label will be obtained based on the molecular formula.
name (str, optional): Name of the Firework. Defaults to
"get_ff_dict".
parents (Firework or [Firework], optional): List of parent
Fireworks that this Firework depends on. Defaults to
``None``.
working_dir (str, optional): Directory to run the Firework
in. Defaults to the current working directory.
db (str or dict, optional): Database credentials. Could be
provided as the path to the db.json file or in the form
of a dict. If none is provided, attempts to read it
from the configuration files to save the Firework to.
save_ff_to_db (bool, optional): Whether to save the force
field to the database. Defaults to False.
save_ff_to_file (bool, optional): Whether to save the force
field to a file. Defaults to True.
ff_filename (str, optional): Filename to save the force
field to. Defaults to "ff.json".
tag (str): Tag for the Firework. The provided tag will be
stored in the db documents for easy retrieval. Defaults
to "unknown".
label (str, optional): Label for the molecule. This should be unique for
each different molecular species in the system. Defaults to an empty
string. In this case, the label will be obtained based on the molecular
formula.
name (str, optional): Name of the Firework. Defaults to ``get_ff_dict``.
parents (Firework or [Firework], optional): List of parent Fireworks that
this Firework depends on. Defaults to ``None``.
working_dir (str, optional): Directory to run the Firework in. Defaults to
the current working directory.
db (str or dict, optional): Database credentials. Could be provided as the
path to the "db.json" file or in the form of a dict. If none is provided,
attempts to read it from the configuration files to save the Firework to.
save_ff_to_db (bool, optional): Whether to save the force field to the
database. Defaults to ``False``.
save_ff_to_file (bool, optional): Whether to save the force field to a file.
Defaults to ``True``.
ff_filename (str, optional): Filename to save the force field to. Defaults
to "ff.json".
tag (str): Tag for the Firework. The provided tag will be stored in the db
documents for easy retrieval. Defaults to "unknown".
kwargs: Other kwargs that are passed to:
1. Firework.__init__
Expand Down Expand Up @@ -474,21 +466,17 @@ def __init__(
):
"""
Args:
md_property (str): The property to calculate. Supported
properties:
md_property (str): The property to calculate. Supported properties:
1. 'diffusion': Calculate the diffusion coefficient.
2. 'rdf': Calculate the radial distribution function.
name (str, optional): Name of the Firework. Defaults to
"run_analysis".
parents (Firework or [Firework], optional): List of parent
Fireworks that this Firework depends on. Defaults to
``None``.
working_dir (str, optional): Directory to run the Firework
in. Defaults to the current working directory.
tag (str): Tag for the Firework. The provided tag will be
stored in the db documents for easy retrieval. Defaults
to "unknown".
name (str, optional): Name of the Firework. Defaults to "run_analysis".
parents (Firework or [Firework], optional): List of parent Fireworks that
this Firework depends on. Defaults to ``None``.
working_dir (str, optional): Directory to run the Firework in. Defaults to
the current working directory.
tag (str): Tag for the Firework. The provided tag will be stored in the db
documents for easy retrieval. Defaults to "unknown".
kwargs: Other kwargs that are passed to:
1. Firework.__init__
Expand Down

0 comments on commit 8fa2d23

Please sign in to comment.