QCSpecificationHandler

class openff.qcsubmit.common_structures.QCSpecificationHandler(*, qc_specifications={'default': QCSpec(method='B3LYP-D3BJ', basis='DZVP', program='psi4', spec_name='default', spec_description='Standard OpenFF optimization quantum chemistry specification.', store_wavefunction=<WavefunctionProtocolEnum.none: 'none'>, implicit_solvent=None, maxiter=200, scf_properties=[<SCFProperties.Dipole: 'dipole'>, <SCFProperties.Quadrupole: 'quadrupole'>, <SCFProperties.WibergLowdinIndices: 'wiberg_lowdin_indices'>, <SCFProperties.MayerIndices: 'mayer_indices'>], keywords={})})[source]

A mixin class for handling the QCSpecification

Parameters

qc_specifications (Dict[str, openff.qcsubmit.common_structures.QCSpec]) –

Return type

None

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Parameters

data (Any) –

Return type

None

Methods

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

add_qc_spec(method, basis, program, ...[, ...])

Add a new qcspecification to the factory which will be applied to the dataset.

clear_qcspecs()

Clear out any current QCSpecs.

construct([_fields_set])

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy(*[, include, exclude, update, deep])

Duplicate a model, optionally choose which fields to include, exclude and change.

dict(*[, include, exclude, by_alias, ...])

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

from_orm(obj)

json(*[, include, exclude, by_alias, ...])

Generate a JSON representation of the model, include and exclude arguments as per dict().

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

remove_qcspec(spec_name)

Remove a QCSpec from the dataset.

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

validate(value)

Attributes

n_qc_specs

Return the number of QCSpecs on this dataset.

qc_specifications

clear_qcspecs()[source]

Clear out any current QCSpecs.

Return type

None

remove_qcspec(spec_name)[source]

Remove a QCSpec from the dataset.

Parameters

spec_name (str) – The name of the spec that should be removed.

Return type

None

Note

The QCSpec settings are not mutable and so they must be removed and a new one added to ensure they are fully validated.

property n_qc_specs: int

Return the number of QCSpecs on this dataset.

add_qc_spec(method, basis, program, spec_name, spec_description, store_wavefunction='none', overwrite=False, implicit_solvent=None, maxiter=200, scf_properties=None, keywords=None)[source]

Add a new qcspecification to the factory which will be applied to the dataset.

Parameters
  • method (str) – The name of the method to use eg B3LYP-D3BJ

  • basis (Optional[str]) – The name of the basis to use can also be None

  • program (str) – The name of the program to execute the computation

  • spec_name (str) – The name the spec should be stored under

  • spec_description (str) – The description of the spec

  • store_wavefunction (str) – what parts of the wavefunction that should be saved

  • overwrite (bool) – If there is a spec under this name already overwrite it

  • implicit_solvent (Optional[Union[openff.qcsubmit.common_structures.PCMSettings, openff.qcsubmit.common_structures.DDXSettings]]) – The implicit solvent settings if it is to be used.

  • maxiter (pydantic.v1.types.PositiveInt) – The maximum number of SCF iterations that should be done.

  • scf_properties (Optional[List[openff.qcsubmit.common_structures.SCFProperties]]) – The list of SCF properties that should be extracted from the calculation.

  • keywords (Optional[Dict[str, Union[pydantic.v1.types.StrictStr, pydantic.v1.types.StrictInt, pydantic.v1.types.StrictFloat, pydantic.v1.types.StrictBool, List[pydantic.v1.types.StrictFloat]]]]) – Program specific computational keywords that should be passed to the program

Return type

None