atomate.qchem package



atomate.qchem.database module

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 calculations 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.


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.


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.


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

dict: 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.

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

(parent, subdirs, files).


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.

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': {'final_energy', 'initial_molecule', 'job_type'}, 'root': {'calcs_reversed', 'chemsys', 'cputime', 'dir_name', 'formula_alphabetical', 'formula_anonymous', 'formula_pretty', 'input', 'output', 'pointgroup', 'smiles', 'walltime'}}

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, input_file='mol.qin')

Replaces all RunQChem commands (i.e. RunQChemDirect, RunQChemCustodian) with RunQChemFake. This allows for testing without actually running QChem. Also deletes any RunCritic2 firetasks. Critic2 outputs will always be copied into the calc directory along with QChem outputs by RunQChemFake, so ProcessCritic2 will still run as expected.


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



Module contents