CommonBase

pydantic model openff.qcsubmit.common_structures.CommonBase[source]

A common base structure which the dataset and factory classes derive from.

Show JSON schema
{
   "title": "CommonBase",
   "description": "A common base structure which the dataset and factory classes derive from.",
   "type": "object",
   "properties": {
      "qc_specifications": {
         "title": "Qc Specifications",
         "description": "The QCSpecifications which will be computed for this dataset.",
         "default": {
            "default": {
               "method": "B3LYP-D3BJ",
               "basis": "DZVP",
               "program": "psi4",
               "spec_name": "default",
               "spec_description": "Standard OpenFF optimization quantum chemistry specification.",
               "store_wavefunction": "none",
               "implicit_solvent": null,
               "maxiter": 200,
               "scf_properties": [
                  "dipole",
                  "quadrupole",
                  "wiberg_lowdin_indices",
                  "mayer_indices"
               ],
               "keywords": {}
            }
         },
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/QCSpec"
         }
      },
      "driver": {
         "description": "The type of single point calculations which will be computed. Note some services require certain calculations for example optimizations require graident calculations.",
         "default": "energy",
         "allOf": [
            {
               "$ref": "#/definitions/SinglepointDriver"
            }
         ]
      },
      "priority": {
         "title": "Priority",
         "description": "The priority the dataset should be computed at compared to other datasets currently running.",
         "default": "normal",
         "type": "string"
      },
      "dataset_tags": {
         "title": "Dataset Tags",
         "description": "The dataset tags which help identify the dataset.",
         "default": [
            "openff"
         ],
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "compute_tag": {
         "title": "Compute Tag",
         "description": "The tag the computes tasks will be assigned to, managers wishing to execute these tasks should use this compute tag.",
         "default": "openff",
         "type": "string"
      }
   },
   "definitions": {
      "WavefunctionProtocolEnum": {
         "title": "WavefunctionProtocolEnum",
         "description": "Wavefunction to keep from a computation.",
         "enum": [
            "all",
            "orbitals_and_eigenvalues",
            "occupations_and_eigenvalues",
            "return_results",
            "none"
         ],
         "type": "string"
      },
      "PCMSettings": {
         "title": "PCMSettings",
         "description": "A class to handle PCM settings which can be used with PSi4.",
         "type": "object",
         "properties": {
            "units": {
               "title": "Units",
               "description": "The units used in the input options atomic units are used by default.",
               "type": "string"
            },
            "codata": {
               "title": "Codata",
               "description": "The set of fundamental physical constants to be used in the module.",
               "default": 2010,
               "type": "integer"
            },
            "cavity_Type": {
               "title": "Cavity Type",
               "description": "Completely specifies type of molecular surface and its discretization.",
               "default": "GePol",
               "type": "string"
            },
            "cavity_Area": {
               "title": "Cavity Area",
               "description": "Average area (weight) of the surface partition for the GePol cavity in the specified units. By default this is in AU.",
               "default": 0.3,
               "type": "number"
            },
            "cavity_Scaling": {
               "title": "Cavity Scaling",
               "description": "If true, the radii for the spheres will be scaled by 1.2. For finer control on the scaling factor for each sphere, select explicit creation mode.",
               "default": true,
               "type": "boolean"
            },
            "cavity_RadiiSet": {
               "title": "Cavity Radiiset",
               "description": "Select set of atomic radii to be used. Currently Bondi-Mantina Bondi, UFF  and Allinger\u2019s MM3 sets available. Radii in Allinger\u2019s MM3 set are obtained by dividing the value in the original paper by 1.2, as done in the ADF COSMO implementation We advise to turn off scaling of the radii by 1.2 when using this set.",
               "default": "Bondi",
               "type": "string"
            },
            "cavity_MinRadius": {
               "title": "Cavity Minradius",
               "description": "Minimal radius for additional spheres not centered on atoms. An arbitrarily big value is equivalent to switching off the use of added spheres, which is the default in AU.",
               "default": 100,
               "type": "number"
            },
            "cavity_Mode": {
               "title": "Cavity Mode",
               "description": "How to create the list of spheres for the generation of the molecular surface.",
               "default": "Implicit",
               "type": "string"
            },
            "medium_SolverType": {
               "title": "Medium Solvertype",
               "description": "Type of solver to be used. All solvers are based on the Integral Equation Formulation of the Polarizable Continuum Model.",
               "default": "IEFPCM",
               "type": "string"
            },
            "medium_Nonequilibrium": {
               "title": "Medium Nonequilibrium",
               "description": "Initializes an additional solver using the dynamic permittivity. To be used in response calculations.",
               "default": false,
               "type": "boolean"
            },
            "medium_Solvent": {
               "title": "Medium Solvent",
               "description": "Specification of the dielectric medium outside the cavity. Note this will always be converted to the molecular formula to aid parsing via PCM.",
               "type": "string"
            },
            "medium_MatrixSymm": {
               "title": "Medium Matrixsymm",
               "description": "If True, the PCM matrix obtained by the IEFPCM collocation solver is symmetrized.",
               "default": true,
               "type": "boolean"
            },
            "medium_Correction": {
               "title": "Medium Correction",
               "description": "Correction, k for the apparent surface charge scaling factor in the CPCM solver.",
               "default": 0.0,
               "minimum": 0,
               "type": "number"
            },
            "medium_DiagonalScaling": {
               "title": "Medium Diagonalscaling",
               "description": "Scaling factor for diagonal of collocation matrices, values commonly used in the literature are 1.07 and 1.0694.",
               "default": 1.07,
               "minimum": 0,
               "type": "number"
            },
            "medium_ProbeRadius": {
               "title": "Medium Proberadius",
               "description": "Radius of the spherical probe approximating a solvent molecule. Used for generating the solvent-excluded surface (SES) or an approximation of it. Overridden by the built-in value for the chosen solvent. Default in AU.",
               "default": 1.0,
               "type": "number"
            }
         },
         "required": [
            "units",
            "medium_Solvent"
         ]
      },
      "SCFProperties": {
         "title": "SCFProperties",
         "description": "The type of SCF property that should be extracted from a single point calculation.",
         "enum": [
            "dipole",
            "quadrupole",
            "mulliken_charges",
            "lowdin_charges",
            "wiberg_lowdin_indices",
            "mayer_indices",
            "mbis_charges"
         ],
         "type": "string"
      },
      "QCSpec": {
         "title": "QCSpec",
         "description": "A basic config class for results structures.",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "The name of the computational model used to execute the calculation. This could be the QC method or the forcefield name.",
               "default": "B3LYP-D3BJ",
               "type": "string"
            },
            "basis": {
               "title": "Basis",
               "description": "The name of the basis that should be used with the given method, outside of QC this can be the parameterization ie antechamber or None.",
               "default": "DZVP",
               "type": "string"
            },
            "program": {
               "title": "Program",
               "description": "The name of the program that will be used to perform the calculation.",
               "default": "psi4",
               "type": "string"
            },
            "spec_name": {
               "title": "Spec Name",
               "description": "The name the specification will be stored under in QCArchive.",
               "default": "default",
               "type": "string"
            },
            "spec_description": {
               "title": "Spec Description",
               "description": "The description of the specification which will be stored in QCArchive.",
               "default": "Standard OpenFF optimization quantum chemistry specification.",
               "type": "string"
            },
            "store_wavefunction": {
               "description": "The level of wavefunction detail that should be saved in QCArchive. Note that this is done for every calculation and should not be used with optimizations.",
               "default": "none",
               "allOf": [
                  {
                     "$ref": "#/definitions/WavefunctionProtocolEnum"
                  }
               ]
            },
            "implicit_solvent": {
               "title": "Implicit Solvent",
               "description": "If PCM is to be used with psi4 this is the full description of the settings that should be used.",
               "allOf": [
                  {
                     "$ref": "#/definitions/PCMSettings"
                  }
               ]
            },
            "maxiter": {
               "title": "Maxiter",
               "description": "The maximum number of SCF iterations in QM calculations this will be ignored by programs where this does not make sense.",
               "default": 200,
               "exclusiveMinimum": 0,
               "type": "integer"
            },
            "scf_properties": {
               "description": "The SCF properties which should be extracted after every single point calculation.",
               "default": [
                  "dipole",
                  "quadrupole",
                  "wiberg_lowdin_indices",
                  "mayer_indices"
               ],
               "type": "array",
               "items": {
                  "$ref": "#/definitions/SCFProperties"
               }
            },
            "keywords": {
               "title": "Keywords",
               "description": "An optional set of program specific computational keywords that should be passed to the program. These may include, for example, DFT grid settings.",
               "default": {},
               "type": "object",
               "additionalProperties": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "integer"
                     },
                     {
                        "type": "number"
                     },
                     {
                        "type": "boolean"
                     },
                     {
                        "type": "array",
                        "items": {
                           "type": "number"
                        }
                     }
                  ]
               }
            }
         }
      },
      "SinglepointDriver": {
         "title": "SinglepointDriver",
         "description": "An enumeration.",
         "enum": [
            "energy",
            "gradient",
            "hessian",
            "properties",
            "deferred"
         ],
         "type": "string"
      }
   }
}

Config
  • allow_mutation: bool = True

  • arbitrary_types_allowed: bool = True

  • json_encoders: dict = {<class ‘numpy.ndarray’>: <function DatasetConfig.Config.<lambda> at 0x7f2da9e5f380>, <enum ‘Enum’>: <function DatasetConfig.Config.<lambda> at 0x7f2da9ea5bc0>}

  • validate_assignment: bool = True

Fields
field driver: qcportal.singlepoint.record_models.SinglepointDriver = SinglepointDriver.energy

The type of single point calculations which will be computed. Note some services require certain calculations for example optimizations require graident calculations.

field priority: str = 'normal'

The priority the dataset should be computed at compared to other datasets currently running.

field dataset_tags: List[str] = ['openff']

The dataset tags which help identify the dataset.

field compute_tag: str = 'openff'

The tag the computes tasks will be assigned to, managers wishing to execute these tasks should use this compute tag.

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)

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[openff.qcsubmit.common_structures.PCMSettings]) – The implicit solvent settings if it is to be used.

  • maxiter (pydantic.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.types.StrictStr, pydantic.types.StrictInt, pydantic.types.StrictFloat, pydantic.types.StrictBool, List[pydantic.types.StrictFloat]]]]) – Program specific computational keywords that should be passed to the program

Return type

None

clear_qcspecs()

Clear out any current QCSpecs.

Return type

None

dict(*args, **kwargs)[source]

Overwrite the dict method to handle any enums when saving to yaml/json via a dict call.

property n_qc_specs: int

Return the number of QCSpecs on this dataset.

remove_qcspec(spec_name)

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.

field qc_specifications: Dict[str, openff.qcsubmit.common_structures.QCSpec] = {'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={})}

The QCSpecifications which will be computed for this dataset.