openff.recharge.charges.bcc.BCCCollection

model openff.recharge.charges.bcc.BCCCollection[source]

Bases: BaseModel

The settings which describes which BCCs should be applied, as well as information about how they should be applied.

Fields
field parameters: List[openff.recharge.charges.bcc.BCCParameter] [Required]

The bond charge corrections to apply.

field aromaticity_model: openff.recharge.aromaticity._aromaticity.AromaticityModels = AromaticityModels.AM1BCC

The model to use when assigning aromaticity.

to_smirnoff() ChargeIncrementModelHandler[source]

Converts this collection of bond charge correction parameters to a SMIRNOFF bond charge increment parameter handler.

Notes

  • The AM1BCC charges applied by this handler will likely not match those computed using the built-in OpenEye implementation as that implementation uses a custom aromaticity model not supported by SMIRNOFF. This is in addition to potential conversion errors of the parameters into the SMIRKS language.

  • The aromaticity model defined by the collection will be ignored as this handler will parse the aromaticity model directly from the top level aromaticity node of the the SMIRNOFF specification.

Return type

The constructed parameter handler.

classmethod from_smirnoff(parameter_handler: ChargeIncrementModelHandler, aromaticity_model=AromaticityModels.MDL) BCCCollection[source]

Attempts to convert a SMIRNOFF bond charge increment parameter handler to a bond charge parameter collection.

Notes

  • Only bond charge corrections (i.e. corrections whose SMIRKS only involve two tagged atoms) are supported currently.

Parameters
  • parameter_handler – The parameter handler to convert.

  • aromaticity_model – The model which describes how aromaticity should be assigned when applying the bond charge correction parameters.

Return type

The converted bond charge correction collection.

vectorize(smirks: List[str]) ndarray[source]

Returns a flat vector of the charge increment values associated with each SMIRKS pattern in a specified list.

Parameters

smirks – A list of SMIRKS patterns corresponding to the BCC values to include in the returned vector.

Return type

A flat vector of charge increments with shape=(n_smirks, 1)