atomate.qchem package — atomate 0.9.2 documentation

# atomate.qchem package

## Subpackages

- atomate.qchem.firetasks package
  - Subpackages
    - atomate.qchem.firetasks.tests package
      - Submodules
      - atomate.qchem.firetasks.tests.test_fragmenter module
      - atomate.qchem.firetasks.tests.test_geo_transformations module
      - atomate.qchem.firetasks.tests.test_run_calc module
      - atomate.qchem.firetasks.tests.test_write_inputs module
      - Module contents
  - Submodules
  - atomate.qchem.firetasks.fragmenter module
  - atomate.qchem.firetasks.geo_transformations module
  - atomate.qchem.firetasks.parse_outputs module
  - atomate.qchem.firetasks.run_calc module
  - atomate.qchem.firetasks.write_inputs module
  - Module contents
- atomate.qchem.fireworks package
  - Submodules
  - atomate.qchem.fireworks.core module
  - Module contents
- atomate.qchem.workflows package
  - Subpackages
    - atomate.qchem.workflows.base package
      - Submodules
      - atomate.qchem.workflows.base.double_FF_opt module
      - atomate.qchem.workflows.base.fragmentation module
      - atomate.qchem.workflows.base.torsion_potential module
      - Module contents
    - atomate.qchem.workflows.tests package
      - Submodules
      - atomate.qchem.workflows.tests.test_double_FF_opt module
      - atomate.qchem.workflows.tests.test_fragmentation module
      - atomate.qchem.workflows.tests.test_parse_pass_write module
      - atomate.qchem.workflows.tests.test_torsion_potential module
      - Module contents
  - Module contents

## Submodules

## atomate.qchem.database module

class `atomate.qchem.database.` `QChemCalcDb`(host='localhost', port=27017, database='qchem', collection='tasks', user=None, password=None, **kwargs)

  Bases: `atomate.utils.database.CalcDb`

  Class to help manage database insertions of QChem drones

  `__init__`(host='localhost', port=27017, database='qchem', collection='tasks', user=None, password=None, **kwargs)

    Initialize self. See help(type(self)) for accurate signature.

  `build_indexes`(indexes=None, background=True)

    Build the indexes.

    Args:

      indexes (list): list of single field indexes to be built. background (bool): Run in the background or not.

    TODO: make sure that the index building is sensible and check for

      existing indexes.

  `reset`()

## atomate.qchem.drones module

class `atomate.qchem.drones.` `QChemDrone`(runs=None, additional_fields=None)

  Bases: `pymatgen.apps.borg.hive.AbstractDrone`

  A QChem drone to parse QChem calculations and insert an organized, searchable entry into the database.

  `__init__`(runs=None, additional_fields=None)

    Initialize a QChem drone to parse qchem calculations Args:

    > runs (list): Naming scheme for multiple calcuations in one folder additional_fields (dict): dictionary of additional fields to add to output document

  `assimilate`(path, input_file, output_file, multirun)

    Parses qchem input and output files and insert the result into the db.

    Args:

      path (str): Path to the directory containing output file input_file (str): base name of the input file(s) output_file (str): base name of the output file(s) multirun (bool): Whether the job to parse includes multiple

      > calculations in one input / output pair.

    Returns:

      d (dict): a task dictionary

  `filter_files`(path, file_pattern)

    Find the files that match the pattern in the given path and return them in an ordered dictionary. The searched for files are filtered by the run types defined in self.runs.

    Args:

      path (string): path to the folder file_pattern (string): base files to be searched for

    Returns:

      OrderedDict of the names of the files to be processed further. The key is set from list of run types: self.runs

  `generate_doc`(dir_name, qcinput_files, qcoutput_files, multirun)
  static `get_valid_paths`(self, path)

    Checks if path contains valid data for assimilation, and then returns the valid paths. The paths returned can be a list of directory or file paths, depending on what kind of data you are assimilating. For example, if you are assimilating VASP runs, you are only interested in directories containing vasprun.xml files. On the other hand, if you are interested converting all POSCARs in a directory tree to cifs for example, you will want the file paths.

    Args:
      path: input path as a tuple generated from os.walk, i.e.,

        (parent, subdirs, files).

    Returns:

      List of valid dir/file paths for assimilation

  static `post_process`(dir_name, d)

    Post-processing for various files other than the QChem input and output files. Currently only looks for custodian.json. Modify this if other files need to be processed.

  static `process_qchem_multirun`(dir_name, input_files, output_files)

    Process a QChem run which is known to include multiple calculations in a single input/output pair.

  static `process_qchemrun`(dir_name, taskname, input_file, output_file)

    Process a QChem calculation, aka an input/output pair.

  `schema` = {'input': {'initial_molecule', 'job_type'}, 'output': {'initial_molecule', 'job_type'}, 'root': {'calcs_reversed', 'chemsys', 'cputime', 'dir_name', 'formula_anonymous', 'formula_pretty', 'input', 'output', 'pointgroup', 'smiles', 'walltime'}}
  `validate_doc`(d)

    Sanity check, aka make sure all the important keys are set. Note that a failure to pass validation is unfortunately unlikely to be noticed by a user.

## atomate.qchem.powerups module

`atomate.qchem.powerups.` `use_fake_qchem`(original_wf, ref_dirs)

  Replaces all RunQChem commands (i.e. RunQChemDirect, RunQChemCustodian) with RunQChemFake. This allows for testing without actually running QChem

  Args:

    original_wf (Workflow) ref_dirs (dict): key=firework name, value=path to the reference QChem calculation directory

  Returns:

    Workflow

## Module contents