atomate.qchem.workflows.base package — atomate 0.9.2 documentation

# atomate.qchem.workflows.base package

## Submodules

## atomate.qchem.workflows.base.double_FF_opt module

`atomate.qchem.workflows.base.double_FF_opt.` `get_wf_double_FF_opt`(molecule, pcm_dielectric, max_cores='>>max_cores<<', qchem_input_params=None, name='douple_FF_opt', qchem_cmd='>>qchem_cmd<<', db_file='>>db_file<<', **kwargs)
  Firework 1write QChem input for an FF optimization,

    run FF_opt QCJob, parse directory and insert into db, pass relaxed molecule to fw_spec and on to fw2,

  Firework 2write QChem input for an optimization in the

    > presence of a PCM, using the molecule passed from fw1,

    run FF_opt QCJob, parse directory and insert into db

  Args:

    molecule (Molecule): input molecule to be optimized and run. pcm_dielectric (float): The PCM dielectric constant. max_cores (int): Maximum number of cores to parallelize over.

    > Defaults to 32.

    qchem_input_params (dict): Specify kwargs for instantiating the input set parameters.

      Basic uses would be to modify the default inputs of the set, such as dft_rung, basis_set, pcm_dielectric, scf_algorithm, or max_scf_cycles. See pymatgen/io/qchem/sets.py for default values of all input parameters. For instance, if a user wanted to use a more advanced DFT functional, include a pcm with a dielectric of 30, and use a larger basis, the user would set qchem_input_params = {“dft_rung”: 5, “pcm_dielectric”: 30, “basis_set”: “6-311++g**”}. However, more advanced customization of the input is also possible through the overwrite_inputs key which allows the user to directly modify the rem, pcm, smd, and solvent dictionaries that QChemDictSet passes to inputs.py to print an actual input file. For instance, if a user wanted to set the sym_ignore flag in the rem section of the input file to true, then they would set qchem_input_params = {“overwrite_inputs”: “rem”: {“sym_ignore”: “true”}}. Of course, overwrite_inputs could be used in conjuction with more typical modifications, as seen in the test_double_FF_opt workflow test.

    qchem_cmd (str): Command to run QChem. db_file (str): path to file containing the database credentials. kwargs (keyword arguments): additional kwargs to be passed to Workflow

  Returns:

    Workflow

## atomate.qchem.workflows.base.fragmentation module

`atomate.qchem.workflows.base.fragmentation.` `get_fragmentation_wf`(molecule, depth=1, open_rings=True, additional_charges=None, do_triplets=True, pcm_dielectric=None, do_optimization=True, max_cores='>>max_cores<<', qchem_input_params=None, name='FF then fragment', qchem_cmd='>>qchem_cmd<<', db_file='>>db_file<<', check_db=True, **kwargs)
  Args:

    molecule (Molecule): input molecule to be fragmented. depth (int): The number of levels of iterative fragmentation to perform,

    > where each evel will include fragments obtained by breaking one bond of a fragment one level up. If set to 0, instead all possible fragments are generated using an alternative, non-iterative scheme. Defaults to 1.

    open_rings (bool): Whether or not to open any rings encountered during fragmentation.

      Defaults to True. If true, any bond that fails to yield disconnected graphs when broken is instead removed and the entire structure is optimized with OpenBabel in order to obtain a good initial guess for an opened geometry that can then be put back into QChem to be optimized without the ring just reforming.

    additional_charges (list): List of additional charges besides the defaults described in the

      firetask. For example, if a principle molecule with a +2 charge is provided, by default all fragments will be calculated with +1 and +2 charges. If the user includes additional_charges=[0] then all fragments will be calculated with 0, +1, and +2 charges. Additional charge values of 1 or 2 would not cause any new charges to be calculated as they are already done. Defaults to [].

    do_triplets (bool): Whether to simulate triplets as well as singlets for molecules with

      an even number of electrons. Defaults to True.

    pcm_dielectric (float): The PCM dielectric constant. do_optimization (bool): Whether or not to optimize the given molecule

    > before fragmentation. Defaults to True.

    max_cores (int): Maximum number of cores to parallelize over.

      Value obtained from the environment by default.

    qchem_input_params (dict): Specify kwargs for instantiating the input set parameters.

      Basic uses would be to modify the default inputs of the set, such as dft_rung, basis_set, pcm_dielectric, scf_algorithm, or max_scf_cycles. See pymatgen/io/qchem/sets.py for default values of all input parameters. For instance, if a user wanted to use a more advanced DFT functional, include a pcm with a dielectric of 30, and use a larger basis, the user would set qchem_input_params = {“dft_rung”: 5, “pcm_dielectric”: 30, “basis_set”: “6-311++g**”}. However, more advanced customization of the input is also possible through the overwrite_inputs key which allows the user to directly modify the rem, pcm, smd, and solvent dictionaries that QChemDictSet passes to inputs.py to print an actual input file. For instance, if a user wanted to set the sym_ignore flag in the rem section of the input file to true, then they would set qchem_input_params = {“overwrite_inputs”: “rem”: {“sym_ignore”: “true”}}. Of course, overwrite_inputs could be used in conjuction with more typical modifications, as seen in the test_double_FF_opt workflow test.

    qchem_cmd (str): Command to run QChem. Supports env_chk. db_file (str): path to file containing the database credentials. check_db (bool): Whether or not to check the database for equivalent

    > structures before adding new fragment fireworks. Defaults to True.

    kwargs (keyword arguments): additional kwargs to be passed to Workflow

  Returns:

    Workflow with the following fireworks:

    Firework 1write QChem input for an FF optimization,

      run FF_opt QCJob, parse directory and insert into db, pass relaxed molecule to fw_spec and on to fw2,

    Firework 2find all unique fragments of the optimized molecule

      and add a frequency flattening optimize FW to the workflow for each one

    Note that Firework 1 is only present if do_optimization=True.

## atomate.qchem.workflows.base.torsion_potential module

`atomate.qchem.workflows.base.torsion_potential.` `get_wf_torsion_potential`(molecule, atom_indexes, angles, rem, name='torsion_potential', qchem_cmd='>>qchem_cmd<<', multimode='>>multimode<<', max_cores='>>max_cores<<', db_file=None, **kwargs)

  Returns a workflow to the torsion potential for a molecule.

  Firework 1write QChem input for an optimization,

    run Qchem, parse output and insert into db, pass relaxed molecule to fw_spec and on to fw2,

  Firework 2rotate molecule torsion to a particular angle,

    write QChem input for an optimization, run Qchem, parse output and insert into db

  last Firework : add analysis code at some point

  > Args:

  >   molecule (Molecule): Input molecule (needs to be a pymatgen molecule object) atom_indexes (list of ints): list of atom indexes in the torsion angle to be rotated (i.e. [6, 8, 9, 10]) angles (list of floats): list of all the torsion angles to run rem (list of two rem dictionaries): a list with two rem dictionaries, one for the first optimization and one for the second constrained optimization name (str): Name for the workflow. qchem_cmd (str): Command to run QChem. Defaults to qchem. multimode (str): Parallelization scheme, either openmp or mpi. input_file (str): Name of the QChem input file. Defaults to mol.qin. output_file (str): Name of the QChem output file. Defaults to mol.qout. max_cores (int): Maximum number of cores to parallelize over. Defaults to 32. qchem_input_params (dict): Specify kwargs for instantiating the input set parameters.

  >   > For example, if you want to change the DFT_rung, you should provide: {“DFT_rung”: …}. Defaults to None.

  >   db_file (str): Path to file specifying db credentials to place output parsing. **kwargs: Other kwargs that are passed to Firework.__init__.

  Returns: Workflow

## Module contents