openforcefield.utils.toolkits.
OpenEyeToolkitWrapper
[source]¶OpenEye toolkit wrapper
Warning
This API is experimental and subject to change.
Attributes: |
|
---|
Methods
compute_partial_charges (molecule[, …]) |
Compute partial charges with OpenEye quacpac |
compute_partial_charges_am1bcc (molecule) |
Compute AM1BCC partial charges with OpenEye quacpac |
compute_wiberg_bond_orders (molecule[, …]) |
Update and store list of bond orders this molecule. |
find_smarts_matches (molecule, smarts[, …]) |
Find all SMARTS matches for the specified molecule, using the specified aromaticity model. |
from_file (filename, file_format[, …]) |
Return an openforcefield.topology.Molecule from a file using this toolkit. |
from_file_obj (file_obj, file_format[, …]) |
Return an openforcefield.topology.Molecule from a file-like object (an object with a “.read()” method using this toolkit. |
from_object (object) |
If given an OEMol (or OEMol-derived object), this function will load it into an openforcefield.topology.molecule Otherwise, it will return False. |
from_openeye (oemol[, allow_undefined_stereo]) |
Create a Molecule from an OpenEye molecule. |
from_smiles (smiles[, hydrogens_are_explicit]) |
Create a Molecule from a SMILES string using the OpenEye toolkit. |
generate_conformers (molecule[, …]) |
Generate molecule conformers using OpenEye Omega. |
is_available () |
Check whether this toolkit wrapper is available for use because the underlying toolkit can be found. |
requires_toolkit () |
|
to_file (molecule, outfile, outfile_format) |
Writes an OpenFF Molecule to a file-like object |
to_file_obj (molecule, file_obj, outfile_format) |
Writes an OpenFF Molecule to a file-like object |
to_openeye (molecule[, aromaticity_model]) |
Create an OpenEye molecule using the specified aromaticity model |
to_smiles (molecule) |
Uses the OpenEye toolkit to convert a Molecule into a SMILES string. |
toolkit_is_available ([oetools]) |
Check if the given OpenEye toolkit components are available. |
__init__
($self, /, *args, **kwargs)¶Initialize self. See help(type(self)) for accurate signature.
Methods
compute_partial_charges (molecule[, …]) |
Compute partial charges with OpenEye quacpac |
compute_partial_charges_am1bcc (molecule) |
Compute AM1BCC partial charges with OpenEye quacpac |
compute_wiberg_bond_orders (molecule[, …]) |
Update and store list of bond orders this molecule. |
find_smarts_matches (molecule, smarts[, …]) |
Find all SMARTS matches for the specified molecule, using the specified aromaticity model. |
from_file (filename, file_format[, …]) |
Return an openforcefield.topology.Molecule from a file using this toolkit. |
from_file_obj (file_obj, file_format[, …]) |
Return an openforcefield.topology.Molecule from a file-like object (an object with a “.read()” method using this toolkit. |
from_object (object) |
If given an OEMol (or OEMol-derived object), this function will load it into an openforcefield.topology.molecule Otherwise, it will return False. |
from_openeye (oemol[, allow_undefined_stereo]) |
Create a Molecule from an OpenEye molecule. |
from_smiles (smiles[, hydrogens_are_explicit]) |
Create a Molecule from a SMILES string using the OpenEye toolkit. |
generate_conformers (molecule[, …]) |
Generate molecule conformers using OpenEye Omega. |
is_available () |
Check whether this toolkit wrapper is available for use because the underlying toolkit can be found. |
requires_toolkit () |
|
to_file (molecule, outfile, outfile_format) |
Writes an OpenFF Molecule to a file-like object |
to_file_obj (molecule, file_obj, outfile_format) |
Writes an OpenFF Molecule to a file-like object |
to_openeye (molecule[, aromaticity_model]) |
Create an OpenEye molecule using the specified aromaticity model |
to_smiles (molecule) |
Uses the OpenEye toolkit to convert a Molecule into a SMILES string. |
toolkit_is_available ([oetools]) |
Check if the given OpenEye toolkit components are available. |
Attributes
toolkit_file_read_formats |
List of file formats that this toolkit can read. |
toolkit_file_write_formats |
List of file formats that this toolkit can write. |
toolkit_installation_instructions |
classmethod(function) -> method |
toolkit_name |
The name of the toolkit wrapped by this class. |
toolkit_is_available
(oetools=('oechem', 'oequacpac', 'oeiupac', 'oeomega'))[source]¶Check if the given OpenEye toolkit components are available.
If the OpenEye toolkit is not installed or no license is found
for at least one the given toolkits , False
is returned.
Parameters: |
|
---|---|
Returns: |
|
is_available
()[source]¶Check whether this toolkit wrapper is available for use because the underlying toolkit can be found.
Note
This method caches the result of any costly checks for file paths or module imports.
Parameters: |
|
---|
from_object
(object)[source]¶If given an OEMol (or OEMol-derived object), this function will load it into an openforcefield.topology.molecule Otherwise, it will return False.
Parameters: |
|
---|---|
Returns: |
|
Raises: |
|
from_file
(filename, file_format, allow_undefined_stereo=False)[source]¶Return an openforcefield.topology.Molecule from a file using this toolkit.
Parameters: |
|
---|---|
Returns: |
|
Raises: |
|
from_file_obj
(file_obj, file_format, allow_undefined_stereo=False)[source]¶Return an openforcefield.topology.Molecule from a file-like object (an object with a “.read()” method using this toolkit.
Parameters: |
|
---|---|
Returns: |
|
to_file_obj
(molecule, file_obj, outfile_format)[source]¶Writes an OpenFF Molecule to a file-like object
Parameters: |
|
---|
to_file
(molecule, outfile, outfile_format)[source]¶Writes an OpenFF Molecule to a file-like object
Parameters: |
|
---|
from_openeye
(oemol, allow_undefined_stereo=False)[source]¶Create a Molecule from an OpenEye molecule.
Warning
This API is experimental and subject to change.
Parameters: |
|
---|---|
Returns: |
|
Examples
Create a Molecule from an OpenEye OEMol
>>> from openeye import oechem
>>> from openforcefield.tests.utils import get_data_filename
>>> ifs = oechem.oemolistream(get_data_filename('systems/monomers/ethanol.mol2'))
>>> oemols = list(ifs.GetOEGraphMols())
>>> toolkit_wrapper = OpenEyeToolkitWrapper()
>>> molecule = toolkit_wrapper.from_openeye(oemols[0])
to_openeye
(molecule, aromaticity_model='OEAroModel_MDL')[source]¶Create an OpenEye molecule using the specified aromaticity model
Todo
- Should the aromaticity model be specified in some other way?
Warning
This API is experimental and subject to change.
Parameters: |
|
---|---|
Returns: |
|
Examples
Create an OpenEye molecule from a Molecule
>>> from openforcefield.topology import Molecule
>>> toolkit_wrapper = OpenEyeToolkitWrapper()
>>> molecule = Molecule.from_smiles('CC')
>>> oemol = toolkit_wrapper.to_openeye(molecule)
to_smiles
(molecule)[source]¶Uses the OpenEye toolkit to convert a Molecule into a SMILES string.
Parameters: |
|
---|---|
Returns: |
|
from_smiles
(smiles, hydrogens_are_explicit=False)[source]¶Create a Molecule from a SMILES string using the OpenEye toolkit.
Warning
This API is experimental and subject to change.
Parameters: |
|
---|---|
Returns: |
|
generate_conformers
(molecule, num_conformers=1, clear_existing=True)[source]¶Generate molecule conformers using OpenEye Omega.
Warning
This API is experimental and subject to change.
Todo
they’ll get reindexed when we convert the input into an OEmol?
Molecule
compute_partial_charges
(molecule, quantum_chemical_method='AM1-BCC', partial_charge_method='None')[source]¶Compute partial charges with OpenEye quacpac
Warning
This API is experimental and subject to change.
Todo
Parameters: |
|
---|---|
Returns: |
|
compute_partial_charges_am1bcc
(molecule)[source]¶Compute AM1BCC partial charges with OpenEye quacpac
Warning
This API is experimental and subject to change.
Todo
Parameters: |
|
---|---|
Returns: |
|
compute_wiberg_bond_orders
(molecule, charge_model=None)[source]¶Update and store list of bond orders this molecule. Can be used for initialization of bondorders list, or for updating bond orders in the list.
Warning
This API is experimental and subject to change.
Parameters: |
|
---|
find_smarts_matches
(molecule, smarts, aromaticity_model='OEAroModel_MDL')[source]¶Find all SMARTS matches for the specified molecule, using the specified aromaticity model.
Warning
This API is experimental and subject to change.
Parameters: |
|
---|
toolkit_file_read_formats
¶List of file formats that this toolkit can read.
toolkit_file_write_formats
¶List of file formats that this toolkit can write.
toolkit_installation_instructions
¶classmethod(function) -> method
Convert a function to be a class method.
A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:
- class C:
@classmethod def f(cls, arg1, arg2, …):
…
It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.
Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.
toolkit_name
¶The name of the toolkit wrapped by this class.