TorsionDriveResultCollection
- pydantic model openff.qcsubmit.results.TorsionDriveResultCollection[source]
A class which stores a reference to, and allows the retrieval of, data from a single torsion drive result record stored in a QCFractal instance.
Show JSON schema
{ "title": "TorsionDriveResultCollection", "description": "A class which stores a reference to, and allows the retrieval of, data from\na single torsion drive result record stored in a QCFractal instance.", "type": "object", "properties": { "entries": { "title": "Entries", "description": "The entries stored in this collection in a dictionary of the form ``collection.entries['qcfractal_address'] = [record_1, ..., record_N]``.", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/TorsionDriveResult" } } }, "provenance": { "title": "Provenance", "description": "A dictionary which can contain provenance information about how and why this collection was curated.", "default": {}, "type": "object" }, "type": { "title": "Type", "default": "TorsionDriveResultCollection", "enum": [ "TorsionDriveResultCollection" ], "type": "string" } }, "required": [ "entries" ], "definitions": { "TorsionDriveResult": { "title": "TorsionDriveResult", "description": "A class which stores a reference to, and allows the retrieval of, data from\na single torsion drive result record stored in a QCFractal instance.", "type": "object", "properties": { "type": { "title": "Type", "default": "torsion", "enum": [ "torsion" ], "type": "string" }, "record_id": { "title": "Record Id", "description": "The unique id assigned to the record referenced by this result.", "type": "integer" }, "cmiles": { "title": "Cmiles", "description": "The canonical, isomeric, explicit hydrogen, mapped SMILES representation of the molecule that this record was created for.", "type": "string" }, "inchi_key": { "title": "Inchi Key", "description": "The fixed hydrogen layer InChI key generated from the ``cmiles`` representation. This may be used as a hash for the molecule referenced by this record.", "type": "string" } }, "required": [ "record_id", "cmiles", "inchi_key" ] } } }
- Fields
entries (Dict[str, List[openff.qcsubmit.results.results.TorsionDriveResult]])
provenance (Dict[str, Any])
type (Literal['TorsionDriveResultCollection'])
- Validators
_validate_entries
»entries
- field entries: Dict[str, List[openff.qcsubmit.results.results.TorsionDriveResult]] [Required]
The entries stored in this collection in a dictionary of the form
collection.entries['qcfractal_address'] = [record_1, ..., record_N]
.- Validated by
_validate_entries
- classmethod from_datasets(datasets, spec_name='default')[source]
Retrieve the COMPLETE record ids referenced by the specified datasets.
- Parameters
datasets (Union[qcportal.torsiondrive.dataset_models.TorsiondriveDataset, Iterable[qcportal.torsiondrive.dataset_models.TorsiondriveDataset]]) – The datasets to retrieve the records from.
spec_name (str) – The name of the QC specification that the records to retrieve should have been computed using.
- Returns
A results collection object containing the record ids and a minimal amount of associated metadata such as the CMILES of the associated molecule.
- Return type
openff.qcsubmit.results.results.TorsionDriveResultCollection
- classmethod from_server(client, datasets, spec_name='default')[source]
Retrieve (and deduplicate) the COMPLETE record ids referenced by the specified datasets.
- Parameters
client (qcportal.client.PortalClient) – The fractal client that should be used to interface with the running QCFractal instance which stores the datasets and their associated results records.
datasets (Union[str, Iterable[str]]) – The names of the datasets
spec_name (str) – The name of the QC specification that the records to retrieve should have been computed using.
- Returns
A results collection object containing the record ids and a minimal amount of associated metadata such as the CMILES of the associated molecule.
- Return type
openff.qcsubmit.results.results.TorsionDriveResultCollection
- to_records()[source]
Returns the native QCPortal record objects for each of the records referenced in this collection along with a corresponding OpenFF molecule object.
Each molecule will contain the minimum energy conformer referenced by the record.
- Return type
List[Tuple[qcportal.torsiondrive.record_models.TorsiondriveRecord, openff.toolkit.topology.molecule.Molecule]]
- create_optimization_dataset(dataset_name, description, tagline, metadata=None)[source]
Create an optimization dataset from the results of the current torsion drive dataset. This will result in many constrained optimizations for each molecule.
Note
The final geometry of each torsiondrive constrained optimization is supplied as a starting geometry.
- Parameters
dataset_name (str) – The name that will be given to the new dataset.
tagline (str) – The tagline that should be given to the new dataset.
description (str) – The description that should be given to the new dataset.
metadata (Optional[openff.qcsubmit.common_structures.Metadata]) – The metadata for the new dataset.
- Returns
The created optimization dataset.
- Return type
qcportal.optimization.dataset_models.OptimizationDataset
- smirnoff_coverage(force_field, verbose=False, driven_only=False)[source]
Returns a summary of how many unique molecules within this collection would be assigned each of the parameters in a force field.
Notes
Parameters which would not be assigned to any molecules in the collection will not be included in the returned summary.
- Parameters
force_field (openff.toolkit.typing.engines.smirnoff.forcefield.ForceField) – The force field containing the parameters to summarize.
verbose (bool) – If true a progress bar will be shown on screen.
driven_only (bool) –
Whether to only include parameters that are applied (at least partially) across a central torsion bond that was driven.
This option is still experimental and may in cases not count parameters that are actually applied or double count certain applied parameters.
- Returns
A dictionary of the form
coverage[handler_name][parameter_smirks] = count
which stores the number of unique molecules within this collection that would be assigned to each parameter.If
driven_only
is true, thencount
will be the number of unique driven torsions, rather than unique molecules.
- filter(*filters)
Filter this collection by applying a set of filters sequentially, returning a new collection containing only the retained entries.
Notes
Information about any applied filters will be stored in the provenance dictionary in the ‘applied-filters’ field. Any existing information in this field will be overwritten here.
- Parameters
filters (ResultFilter) – The filters to apply, in the order to apply them in.
- Returns
The collection containing only the retained entries.
Example:
>>> filtered_collection = self.filter( >>> RecordStatusFilter(status=RecordStatusEnum.complete), >>> ConnectivityFilter(tolerance=1.2), >>> UnperceivableStereoFilter(), >>> ElementFilter(allowed_elements=elements), >>> ConformerRMSDFilter(max_conformers=max_opt_conformers), >>> )
- property n_molecules: int
Returns the number of unique molecules referenced by this collection.
- property n_results: int
Returns the number of results in this collection.
- field provenance: Dict[str, Any] = {}
A dictionary which can contain provenance information about how and why this collection was curated.