openff.recharge.charges.library.LibraryChargeCollection
- model openff.recharge.charges.library.LibraryChargeCollection[source]
Bases:
BaseModel
A library of charges sets that can be applied to molecules.
- field parameters: List[openff.recharge.charges.library.LibraryChargeParameter] [Required]
The library charges to apply.
- to_smirnoff() LibraryChargeHandler [source]
Converts this collection of library charge parameters to a SMIRNOFF library charge parameter handler.
- Return type
The constructed parameter handler.
- classmethod from_smirnoff(parameter_handler: LibraryChargeHandler) LibraryChargeCollection [source]
Attempts to convert a SMIRNOFF library charge parameter handler to a library charge parameter collection.
- Parameters
parameter_handler – The parameter handler to convert.
- Return type
The converted bond charge correction collection.
- vectorize(keys: List[Tuple[str, Tuple[int, ...]]]) ndarray [source]
Returns a flat vector of the charge increment values associated with each SMILES pattern in a specified list.
- Parameters
keys – A list of tuples of the form
(smiles, idx)
that define those parameters in thecharge_collection
that should be trained.Here
idx
is an index into thevalue
field of the parameter uniquely identified by thesmiles
key.- Returns
A flat vector of charge increments with shape=(n_smiles_i, 1) where
n_smiles_i corresponds to the number of tagged atoms in SMILES pattern
i.