d3tales_api.Workflows package

Submodules

d3tales_api.Workflows.D3TaLES_FW module

class d3tales_api.Workflows.D3TaLES_FW.DihedRot(geometry='groundState', dihed_degree=0, parents=None, priority=None, name_tag='', **kwargs)[source]

Bases: Firework

__init__(geometry='groundState', dihed_degree=0, parents=None, priority=None, name_tag='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.EmailEnd(parents=None, priority=None, name_tag='', identifier='', email='', username='', **kwargs)[source]

Bases: Firework

__init__(parents=None, priority=None, name_tag='', identifier='', email='', username='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.EmailStart(parents=None, priority=None, name_tag='', identifier='', email='', username='', **kwargs)[source]

Bases: Firework

__init__(parents=None, priority=None, name_tag='', identifier='', email='', username='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.Energy(species='groundState', geometry='groundState', parents=None, priority=None, name_tag='', solvent=None, **kwargs)[source]

Bases: Firework

__init__(species='groundState', geometry='groundState', parents=None, priority=None, name_tag='', solvent=None, **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.InitializeMolecule(name='initial_molecule_data', parents=None, priority=None, name_tag='', **kwargs)[source]

Bases: Firework

__init__(name='initial_molecule_data', parents=None, priority=None, name_tag='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.MolOpt(name='opt_mol', parents=None, priority=None, name_tag='', **kwargs)[source]

Bases: Firework

__init__(name='opt_mol', parents=None, priority=None, name_tag='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.Optimization(species='groundState', geometry='opt_mol', solvent=None, parents=None, priority=None, name_tag='', **kwargs)[source]

Bases: Firework

__init__(species='groundState', geometry='opt_mol', solvent=None, parents=None, priority=None, name_tag='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.TDDFT(species='groundState', solvent=None, parents=None, priority=None, name_tag='', solv_geom=False, **kwargs)[source]

Bases: Firework

__init__(species='groundState', solvent=None, parents=None, priority=None, name_tag='', solv_geom=False, **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

class d3tales_api.Workflows.D3TaLES_FW.WTuning(name='wtuning', parents=None, priority=None, name_tag='', **kwargs)[source]

Bases: Firework

__init__(name='wtuning', parents=None, priority=None, name_tag='', **kwargs)[source]
Args:

tasks (Firetask or [Firetask]): a list of Firetasks to run in sequence. spec (dict): specification of the job to run. Used by the Firetask. launches ([Launch]): a list of Launch objects of this Firework. archived_launches ([Launch]): a list of archived Launch objects of this Firework. state (str): the state of the FW (e.g. WAITING, RUNNING, COMPLETED, ARCHIVED) created_on (datetime): time of creation fw_id (int): an identification number for this Firework. parents (Firework or [Firework]): list of parent FWs this FW depends on. updated_on (datetime): last time the STATE was updated.

d3tales_api.Workflows.Gaussian module

class d3tales_api.Workflows.Gaussian.GaussianBase(*args, **kwargs)[source]

Bases: FiretaskBase

post_job(upload_files=None, delete_files=None, calc_type=None, name_tag='')[source]
run_check()[source]
setup_calc(fw_spec, calc_type='opt')[source]
setup_files(fw_spec, calc_type='opt')[source]
class d3tales_api.Workflows.Gaussian.RunGaussianDihedRot(*args, **kwargs)[source]

Bases: GaussianBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Gaussian.RunGaussianEnergy(*args, **kwargs)[source]

Bases: GaussianBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Gaussian.RunGaussianOpt(*args, **kwargs)[source]

Bases: GaussianBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Gaussian.RunGaussianTDDFT(*args, **kwargs)[source]

Bases: GaussianBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Gaussian.RunWtuning(*args, **kwargs)[source]

Bases: FiretaskBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

d3tales_api.Workflows.Gromacs module

d3tales_api.Workflows.Initialize module

class d3tales_api.Workflows.Initialize.EmailFinished(*args, **kwargs)[source]

Bases: FiretaskBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Initialize.EmailStarting(*args, **kwargs)[source]

Bases: FiretaskBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class d3tales_api.Workflows.Initialize.Mail[source]

Bases: object

__init__()[source]
send(emails, subject, content)[source]
class d3tales_api.Workflows.Initialize.MoleculeInit(*args, **kwargs)[source]

Bases: FiretaskBase

run_task(fw_spec)[source]

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

d3tales_api.Workflows.ParamSet module

class d3tales_api.Workflows.ParamSet.GausParamSet(name=None, **kwargs)[source]

Bases: MSONable

__init__(name=None, **kwargs)[source]
static from_json(jsonfile)[source]
class d3tales_api.Workflows.ParamSet.GaussianParameters(route_parameters=None, charge=None, multiplicity=None, basis_set=None, functional=None, input_parameters=None, link0_parameters=None)[source]

Bases: MSONable

__init__(route_parameters=None, charge=None, multiplicity=None, basis_set=None, functional=None, input_parameters=None, link0_parameters=None)[source]
class d3tales_api.Workflows.ParamSet.VaspParamSet(name=None, **kwargs)[source]

Bases: MSONable

__init__(name=None, **kwargs)[source]
static from_json(jsonfile)[source]
class d3tales_api.Workflows.ParamSet.VaspParameters(incar=None, kpoints=None)[source]

Bases: MSONable

__init__(incar=None, kpoints=None)[source]
d3tales_api.Workflows.ParamSet.sett(obj, cls)[source]

d3tales_api.Workflows.utils module

d3tales_api.Workflows.utils.generate_gaussian_input(paramset=None, mol=None, dieze_tag='#P')[source]
d3tales_api.Workflows.utils.get_central_dihed(rdk_mol)[source]

function for recording central dihedral atom numbers

d3tales_api.Workflows.utils.get_db_geom(input_geometry_hash, error_raise=False)[source]

get input geometry from DB :param input_geometry_hash: str :return: pymatgen mol object

d3tales_api.Workflows.utils.get_groundState(identifier, prop='charge')[source]

get input geometry frontend DB smiles :param identifier: str :param prop: str :return: int, ground state charge

d3tales_api.Workflows.utils.get_hash_id(identifier, filepath, calc_type, output_file=None)[source]
d3tales_api.Workflows.utils.get_scfs(logfile)[source]
d3tales_api.Workflows.utils.get_tddft_excitations(logfile)[source]

Read a excitation energies after a TD-DFT calculation.

Returns:

A list: A list of tuple for each transition such as

[(energie (eV), lambda (nm), oscillatory strength), … ]

d3tales_api.Workflows.utils.orig_conditions(functional, basis_set, tuning_parameter=None, solvent=None)[source]

Dictionary of conditions (in accordance with D3TaLES backend schema)

d3tales_api.Workflows.utils.orig_hash_id(_id, calculation_type, functional, basis_set, tuning_parameter=None, solvent=None)[source]

Hash ID

d3tales_api.Workflows.utils.parse_tddft(tddft_logfile)[source]
d3tales_api.Workflows.utils.runtime_from_log(logfile)[source]
d3tales_api.Workflows.utils.start_from_smiles(identifier)[source]

get input geometry frontend DB smiles :param identifier: str :return: pymatgen mol object

d3tales_api.Workflows.utils.write_nto(tddft_log, excitation_num, tddft_chk=None)[source]

Run NTO analysis after a TDDFT calculation. https://gaussian.com/faq4/ :param tddft_log: str, path to TDDFT calculation log file :param excitation_num: int, number for excitation on which to run the NTO analysis :param tddft_chk: str, path to TDDFT calculation checkpoint file (assumed to be the same name as log if not specified)

d3tales_api.Workflows.utils.zip_files(file_list, zip_name='upload_zip.zip')[source]

d3tales_api.Workflows.wf_writer module

d3tales_api.Workflows.wf_writer.d3tales_wf(paramset, identifier=None, smiles=None, wtune=True, solvent='acetonitrile', hf_mol_opt=False, email=None, username=None, wf_tag='', **kwargs)[source]
d3tales_api.Workflows.wf_writer.hf_wf(paramset, identifier=None, smiles=None, hf_mol_opt=False, email=None, username=None, solvent=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.huckaba_wf(paramset, identifier=None, smiles=None, solvent='DiMethylSulfoxide', wtune=True, hf_mol_opt=False, email=None, username=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.just_anion(paramset, identifier=None, smiles=None, wtune=False, solvent='acetonitrile', hf_mol_opt=False, email=None, username=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.just_initialize(paramset, identifier=None, smiles=None, solvent='acetonitrile', hf_mol_opt=False, email=None, username=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.just_nmr(paramset, identifier=None, smiles=None, solvent='acetonitrile', hf_mol_opt=False, email=None, username=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.just_tddft(paramset, identifier=None, smiles=None, wtune=False, solvent=None, hf_mol_opt=False, email=None, username=None, check_if_already_run=True, **kwargs)[source]
d3tales_api.Workflows.wf_writer.solv_wf(paramset, identifier=None, smiles=None, wtune=True, solvent='acetonitrile', hf_mol_opt=False, email=None, username=None, **kwargs)[source]
d3tales_api.Workflows.wf_writer.specialized_job(paramset, identifier=None, smiles=None, solvent='acetonitrile', wtune=True, hf_mol_opt=False, email=None, username=None, check_if_already_run=False, **kwargs)[source]

d3tales_api.Workflows.wtuning module

Code taken from the OCELOT API to transform molecule objects. https://github.com/caer200/ocelot_api Code copied from: https://github.com/caer200/ocelot_api/blob/master/ocelot/task/wtuning.py

originally written by Sean M. Ryno, Cheng Zhong, Haitao Sun, see /legacy/aw_tuning.py for a certain mol, get tuned w default keywords for gaussian ‘scf=(xqc,fermi,noincfock,ndamp=35,conver=6,vshift=500,novaracc)’ dev-ing

class d3tales_api.Workflows.wtuning.WtuningJob(func='uLC-wHPBE', basis='def2tzvp', name='', nproc=16, mem=50, n_charge=0, n_spin=1, wdir='./', rps={'scf': {'conver': '6', 'fermi': '', 'ndamp': '35', 'noincfock': '', 'novaracc': '', 'vshift': '500', 'xqc': ''}}, scheme='Jh', wbmin=0.05, wbmax=0.5, abmin=0.05, abmax=0.5, gauss_cmd='g16')[source]

Bases: object

__init__(func='uLC-wHPBE', basis='def2tzvp', name='', nproc=16, mem=50, n_charge=0, n_spin=1, wdir='./', rps={'scf': {'conver': '6', 'fermi': '', 'ndamp': '35', 'noincfock': '', 'novaracc': '', 'vshift': '500', 'xqc': ''}}, scheme='Jh', wbmin=0.05, wbmax=0.5, abmin=0.05, abmax=0.5, gauss_cmd='g16')[source]
alpha_atune(alpha_in)[source]
alpha_format()[source]
property alpha_iopstr
alpha_tune(dis=3, tol=0.0001, deltaalpha=0.2)[source]
atuning_cycle(eps=0.01, dis=3, tol=0.001, max_cycles=5)[source]
property beta_iopstr
static extract_abs(fn)[source]
static extract_energy(fn)[source]
static gauss_run(fn, gcmd)[source]
geo_opt(rps={})[source]
property iop_route_params
log_add(s)[source]
omega_FindC()[source]

Calculate scheme value from extracted data Set the optimization criterion (the value to minimize), available options are: J2—((HOMO-IP)^2+(A_HOMO+EA)^2) Jh—(HOMO-IP) Jl—(LUMO+EA) Jn2—((HOMO-IP)^2+(LUMO+EA)^2) O2—((A_HOMO-LUMO)^2+(C_LUMO-HOMO)^2) :return: Jn, Jl, Jh value (depending on scheme)

static omega_extract(fn)[source]

Pull important data from Log Files after run :param fn: Filename of Log File to be read :return: Energies of Molecule, HOMO and LUMO in eV

omega_format()[source]

Format IOp strings based off of omega value, then update route parameters dictionary and input filenames

omega_gauss_do()[source]

Run Gaussian in subprocess and wait for termination. Extract data from output when done

property omega_iopstr
omega_tune(dis=3, tol=0.0001, deltaomega=0.2)[source]
omega_wtune(omega_in)[source]
Parameters

omega_in – Value for ‘fminbound’ function to pass scalars into

Returns

Scheme value from FindC

to_dict()[source]
to_file()[source]
wtuning_cycle(eps=0.01, dis=3, tol=0.001, max_cycles=5)[source]
d3tales_api.Workflows.wtuning.gauss_in_gen(name, mol, type, func, basis, charge, spin, route_params, link0_params)[source]

Module contents