schrodinger.application.mopac.mopac_launchers module¶
This module contains classes for launching different MOPAC versions.
-
exception
schrodinger.application.mopac.mopac_launchers.
MopacLicenseError
¶ Bases:
Exception
-
__cause__
¶ exception cause
-
__class__
¶ alias of
builtins.type
-
__context__
¶ exception context
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.mopac_launchers', '__weakref__': <attribute '__weakref__' of 'MopacLicenseError' objects>, '__doc__': None})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.mopac_launchers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
()¶
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__
¶
-
__traceback__
¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
schrodinger.application.mopac.mopac_launchers.
MopacLauncher
¶ Bases:
object
This abstract base class (ABC) is designed to guide developers writing code to support future MOPAC releases. It shouldn’t be instantiated.
The intention is that a new release will require a new MopacLauncher subclass and this ABC documents the required interface to be automatically compliant with the legacy code.
- There are currently two subclasses:
- MopacLauncher71 - launches a customized open source Mopac 7.1
- MopacLauncherMain - launches the currently supported version of Mopac
-
default_method
¶
-
valid_methods
¶
-
method_synonyms
¶
-
extra_keywords
¶
-
results
¶
-
run
(inputfile, structure=None)¶ Run a MOPAC calculation in the local directory. The optional Structure object is updated with the output data.
Parameters: inputfile (str) – name of MOPAC .mop input file Return type: MopacResults object
-
write_mop_file
(ct, mopfile, method=None, geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)¶ Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.
Parameters: - ct (schrodinger.structure.Structure) – The structure to use in writing the file.
- mopfile (str) – name of .mop file to write.
- method (str) – The semi-empirical method to use for the calculation.
- geopt (bool) – If True, find the minimum energy geometry.
- keywords (str) – Space-separated keywords to use in MOPAC input file.
- plotMO (int) – Plot <n> MOs around the HOMO/LUMO gap.
- gridres (float) – Grid resolution for plots.
- gridext (float) – Grid size beyond the nuclei.
-
__abstractmethods__
= frozenset({'valid_methods', 'run', 'results', 'default_method', 'extra_keywords', 'write_mop_file', 'method_synonyms'})¶
-
__class__
¶ alias of
abc.ABCMeta
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.mopac_launchers', '__doc__': "\n This abstract base class (ABC) is designed to guide developers writing\n code to support future MOPAC releases.\n It shouldn't be instantiated.\n\n The intention is that a new release will require a new MopacLauncher\n subclass and this ABC documents the required interface to be automatically\n compliant with the legacy code.\n\n There are currently two subclasses:\n (1) MopacLauncher71 - launches a customized open source Mopac 7.1\n (2) MopacLauncherMain - launches the currently supported version of Mopac\n ", 'default_method': <abc.abstractproperty object>, 'valid_methods': <abc.abstractproperty object>, 'method_synonyms': <abc.abstractproperty object>, 'extra_keywords': <abc.abstractproperty object>, 'results': <abc.abstractproperty object>, 'run': <function MopacLauncher.run>, 'write_mop_file': <function MopacLauncher.write_mop_file>, '__dict__': <attribute '__dict__' of 'MopacLauncher' objects>, '__weakref__': <attribute '__weakref__' of 'MopacLauncher' objects>, '__abstractmethods__': frozenset({'valid_methods', 'run', 'results', 'default_method', 'extra_keywords', 'write_mop_file', 'method_synonyms'}), '_abc_registry': <_weakrefset.WeakSet object>, '_abc_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache_version': 49})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.mopac_launchers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
class
schrodinger.application.mopac.mopac_launchers.
MopacLauncher71
¶ Bases:
schrodinger.application.mopac.mopac_launchers.MopacLauncher
This is the API for executing the MOPAC7.1 backend compiled from source, where we link to a shared library.
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-
default_method
¶
-
valid_methods
¶
-
method_synonyms
¶
-
extra_keywords
¶
-
results
¶
-
write_mop_file
(ct, mopfile, method='MNDO', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)¶ Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.
Parameters: - ct (schrodinger.structure.Structure) – The structure to use in writing the file.
- mopfile (str) – name of .mop file to write.
- method (str) – The semi-empirical method to use for the calculation.
- geopt (bool) – If True, find the minimum energy geometry.
- keywords (str) – Space-separated keywords to use in MOPAC input file.
- plotMO (int) – Plot <n> MOs around the HOMO/LUMO gap.
- gridres (float) – Grid resolution for plots.
- gridext (float) – Grid size beyond the nuclei.
-
run
(inputfile, structure=None)¶ Run a MOPAC calculation in the local directory with a .mop input file. The optional Structure object is updated with the output data. Return a MopacResults object.
-
__abstractmethods__
= frozenset()¶
-
__class__
¶ alias of
abc.ABCMeta
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.mopac_launchers', '__doc__': '\n This is the API for executing the MOPAC7.1 backend compiled from source,\n where we link to a shared library.\n ', '_default_method': 'MNDO', '_valid_methods': ['AM1', 'MNDO', 'MNDOD', 'PM3', 'RM1'], '_method_synonyms': {'MNDO-D': 'MNDOD', 'MNDO/D': 'MNDOD'}, '__init__': <function MopacLauncher71.__init__>, 'default_method': <property object>, 'valid_methods': <property object>, 'method_synonyms': <property object>, 'extra_keywords': <property object>, 'results': <property object>, 'write_mop_file': <function MopacLauncher71.write_mop_file>, 'run': <function MopacLauncher71.run>, '__abstractmethods__': frozenset(), '_abc_registry': <_weakrefset.WeakSet object>, '_abc_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache_version': 49})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.mopac_launchers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
schrodinger.application.mopac.mopac_launchers.
MopacLauncherMain
¶ Bases:
schrodinger.application.mopac.mopac_launchers.MopacLauncher
This is the API for executing the backend of the currently supported version of MOPAC as an external binary.
-
MOPAC_EXEC
= 'MOPAC2016.exe'¶
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-
default_method
¶
-
valid_methods
¶
-
method_synonyms
¶
-
extra_keywords
¶
-
results
¶
-
write_mop_file
(ct, mopfile, method='RM1', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)¶ Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.
Parameters: - ct (schrodinger.structure.Structure) – The structure to use in writing the file.
- mopfile (str) – name of .mop file to write.
- method (str) – The semi-empirical method to use for the calculation.
- geopt (bool) – If True, find the minimum energy geometry.
- keywords (str) – Space-separated keywords to use in MOPAC input file.
- plotMO (int) – Plot <n> MOs around the HOMO/LUMO gap.
- gridres (float) – Grid resolution for plots.
- gridext (float) – Grid size beyond the nuclei.
-
run
(inputfile, structure=None)¶ Run a MOPAC calculation in the local directory with a .mop input file. The optional Structure object is updated with the output data. Return a MopacResults object.
Parameters: inputfile (str) – name of .mop input file (without suffix)
-
__abstractmethods__
= frozenset()¶
-
__class__
¶ alias of
abc.ABCMeta
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.mopac_launchers', '__doc__': '\n This is the API for executing the backend of the currently supported\n version of MOPAC as an external binary.\n ', 'MOPAC_EXEC': 'MOPAC2016.exe', '_default_method': 'RM1', '_valid_methods': ['AM1', 'MNDO', 'MNDOD', 'PM3', 'PM6', 'PM6-D3', 'PM6-DH+', 'PM6-DH2', 'PM6-DH2X', 'PM6-D3H4', 'PM6-D3H4X', 'PM7', 'PM7-TS', 'RM1'], '_method_synonyms': {'MNDO-D': 'MNDOD', 'MNDO/D': 'MNDOD'}, '__init__': <function MopacLauncherMain.__init__>, 'default_method': <property object>, 'valid_methods': <property object>, 'method_synonyms': <property object>, 'extra_keywords': <property object>, 'results': <property object>, 'write_mop_file': <function MopacLauncherMain.write_mop_file>, '_tail_output_file': <function MopacLauncherMain._tail_output_file>, '_execute_mopac_binary': <function MopacLauncherMain._execute_mopac_binary>, 'run': <function MopacLauncherMain.run>, '__abstractmethods__': frozenset(), '_abc_registry': <_weakrefset.WeakSet object>, '_abc_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache': <_weakrefset.WeakSet object>, '_abc_negative_cache_version': 49})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.mopac_launchers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
schrodinger.application.mopac.mopac_launchers.
get_mopac_launcher
(version)¶ Return a MopacLauncher object for the requested MOPAC version.
-
schrodinger.application.mopac.mopac_launchers.
get_mopac_results_instance
(version)¶ Return a MopacResults object for the requested MOPAC version.