MoleculeAttributes

class openff.qcsubmit.common_structures.MoleculeAttributes(*, canonical_smiles, canonical_isomeric_smiles, canonical_explicit_hydrogen_smiles, canonical_isomeric_explicit_hydrogen_smiles, canonical_isomeric_explicit_hydrogen_mapped_smiles, molecular_formula, standard_inchi, inchi_key, fixed_hydrogen_inchi=None, fixed_hydrogen_inchi_key=None, unique_fixed_hydrogen_inchi_keys=None, **extra_data)[source]

A class to hold and validate the molecule attributes associated with a QCArchive entry, All attributes are required to be entered into a dataset.

Note

The attributes here are not exhaustive but are based on those given by cmiles and can all be obtain through the openforcefield toolkit Molecule class.

Parameters
  • canonical_smiles (str) –

  • canonical_isomeric_smiles (str) –

  • canonical_explicit_hydrogen_smiles (str) –

  • canonical_isomeric_explicit_hydrogen_smiles (str) –

  • canonical_isomeric_explicit_hydrogen_mapped_smiles (str) –

  • molecular_formula (str) –

  • standard_inchi (str) –

  • inchi_key (str) –

  • fixed_hydrogen_inchi (Optional[str]) –

  • fixed_hydrogen_inchi_key (Optional[str]) –

  • unique_fixed_hydrogen_inchi_keys (Optional[Set[str]]) –

  • extra_data (Any) –

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.

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_openff_molecule(molecule)

Create the Cmiles metadata for an OpenFF molecule object.

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, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

to_openff_molecule()

Create an openff molecule from the CMILES information.

update_forward_refs(**localns)

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

validate(value)

Attributes

canonical_smiles

canonical_isomeric_smiles

canonical_explicit_hydrogen_smiles

canonical_isomeric_explicit_hydrogen_smiles

canonical_isomeric_explicit_hydrogen_mapped_smiles

molecular_formula

standard_inchi

inchi_key

fixed_hydrogen_inchi

fixed_hydrogen_inchi_key

unique_fixed_hydrogen_inchi_keys

classmethod from_openff_molecule(molecule)[source]

Create the Cmiles metadata for an OpenFF molecule object.

Parameters

molecule (openff.toolkit.topology.molecule.Molecule) – The molecule for which the cmiles data will be generated.

Returns

The Cmiles identifiers generated for the input molecule.

Return type

openff.qcsubmit.common_structures.MoleculeAttributes

Note

The Cmiles identifiers currently include:

  • canonical_smiles

  • canonical_isomeric_smiles

  • canonical_explicit_hydrogen_smiles

  • canonical_isomeric_explicit_hydrogen_smiles

  • canonical_isomeric_explicit_hydrogen_mapped_smiles

  • molecular_formula

  • standard_inchi

  • inchi_key

  • fixed_hydrogen_inchi

  • fixed_hydrogen_inchi_key

  • unique_fixed_hydrogen_inchi_keys

to_openff_molecule()[source]

Create an openff molecule from the CMILES information.

Return type

openff.toolkit.topology.molecule.Molecule