openforcefield.utils.toolkits.
ToolkitWrapper
[source]¶Toolkit wrapper base class.
Warning
This API is experimental and subject to change.
Attributes: |
|
---|
Methods
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 |
is_available () |
Check whether this toolkit wrapper is available for use because the underlying toolkit can be found. |
requires_toolkit () |
|
toolkit_is_available () |
Check whether the corresponding toolkit can be imported |
__init__
($self, /, *args, **kwargs)¶Initialize self. See help(type(self)) for accurate signature.
Methods
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 |
is_available () |
Check whether this toolkit wrapper is available for use because the underlying toolkit can be found. |
requires_toolkit () |
|
toolkit_is_available () |
Check whether the corresponding toolkit can be imported |
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_name
¶The name of the toolkit wrapped by this class.
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_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_is_available
()[source]¶Check whether the corresponding toolkit can be imported
Note
This method call may be expensive.
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_file
(filename, file_format, allow_undefined_stereo=False)[source]¶Return an openforcefield.topology.Molecule from a file using this toolkit.
Parameters: |
|
---|
from_file_obj
(file_obj, file_format, allow_undefined_stereo=False)[source]¶Parameters: |
|
---|---|
Returns: |
|