OptimizationEntry
- class openff.qcsubmit.datasets.OptimizationEntry(off_molecule=None, *, index, initial_molecules, attributes, extras={}, keywords={}, constraints=Constraints(freeze=[], set=[]))[source]
An optimization dataset specific entry class which can handle constraints.
- Parameters:
- __init__(off_molecule=None, **kwargs)[source]
Here we handle the constraints before calling the super.
- Parameters:
off_molecule (Molecule | None) –
Methods
__init__
([off_molecule])Here we handle the constraints before calling the super.
add_constraint
(constraint, constraint_type, ...)Add new constraint of the given type.
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)get_off_molecule
([include_conformers])Build and openforcefield.topology.Molecule representation of the input molecule.
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])update_forward_refs
(**localns)Try to update ForwardRefs on fields based on this Model, globalns and localns.
validate
(value)Attributes
Format the keywords with the constraints values.
constraints
index
initial_molecules
attributes
extras
keywords
- add_constraint(constraint, constraint_type, indices, bonded=True, **kwargs)[source]
Add new constraint of the given type.
- Parameters:
constraint (Literal['set', 'freeze']) – The major type of constraint, freeze or set
constraint_type (Literal['distance', 'angle', 'dihedral', 'xyz']) – the constraint sub type, angle, distance etc
indices (List[int]) – The atom indices the constraint should be placed on
bonded (bool) – If the constraint is intended to be put a bonded set of atoms
kwargs – Any extra information needed by the constraint, for the set class they need a value value=float
- Return type:
None