schrodinger.application.mopac.structure_launchers module¶
Currently, we assume this code is universal for all versions of MOPAC we support. i.e. on adding a support for a future MOPAC release, it should not be necessary to (substantially) modify this module.
Copyright Schrodinger, LLC. All rights reserved.
-
exception
schrodinger.application.mopac.structure_launchers.StructureLauncherError¶ Bases:
Exception-
__cause__¶ exception cause
-
__class__¶ alias of
builtins.type
-
__context__¶ exception context
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.mopac.structure_launchers', '__weakref__': <attribute '__weakref__' of 'StructureLauncherError' 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.structure_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.structure_launchers.StructureLauncher(mopac_launcher, method, minimize=True, settings=None, keywords='')¶ Bases:
objectA class for running MOPAC calculations on a Structure object. Typically, this should not be instantiated manually, but instead used via the MopacAPI class using the get_launcher() method etc.
-
CHARGE= 'CHARGE'¶
-
MMOK= 'MMOK'¶
-
NOMM= 'NOMM'¶
-
__init__(mopac_launcher, method, minimize=True, settings=None, keywords='')¶ Parameters: - mopac_launcher (MopacLauncher object) – API to MOPAC backend.
- method (module level constant) – The semi-empirical method to use for the calculation.
- minimize (bool) – If True, minimize the molecule, otherwise calculate a single point energy.
- settings (dict) – A settings dictionary for MOPAC input settings. If a MOPAC keyword does not take a value, set the dictionary value to True.
- keywords (str) – A string of space-separated keywords to use directly in the MOPAC input file. Use of the settings argument is recommended over setting the keyword string directly.
-
setKeyword(key, value=True, raise_conflicts=False)¶ Set the MOPAC keyword to the provided value. If the keyword doesn’t take a value, use True. The keyword will be stored as uppercase regardless of the argument case.
Parameters: raise_conflicts – If True, raise an exception when conflicting keywords are detected. Otherwise, have the current keyword take precedence.
-
getValue(key)¶ Get the value for the provided keyword, whether it was provided a key/value pair or in a MOPAC keywords string. Note that if the keyword and value are specified as part of the keywords string, the value is always returned as a string.
If the keyword is specified but has no value, True is returned.
Raise a KeyError if the keyword isn’t defined.
-
delKeyword(key)¶ Delete the keyword from the keywords specification and the kwdict dictionary.
-
write(structure, filename)¶ Write a MOPAC input file based on the current keyword argument settings and the provided Structure object.
Parameters: - structure (schrodinger.structure.Structure) – The structure to use in writing the file.
- filename (str) – The name of the file to be written.
-
hasKeyword(keyword)¶ If the given keyword was set in the constructor keywords string or as a key in the kwdict dictionary, return True, otherwise return False.
-
run(structure, jobname=None, input_file=False, tmpdir='', scratch_cleanup='remove', save_output_file=False)¶ Run a MOPAC calculation on the provided structure given the object’s current settings.
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.mopac.structure_launchers', '__doc__': '\n A class for running MOPAC calculations on a Structure object.\n Typically, this should not be instantiated manually, but instead\n used via the MopacAPI class using the get_launcher() method etc.\n ', 'CHARGE': 'CHARGE', 'MMOK': 'MMOK', 'NOMM': 'NOMM', '__init__': <function StructureLauncher.__init__>, 'setKeyword': <function StructureLauncher.setKeyword>, 'getValue': <function StructureLauncher.getValue>, 'delKeyword': <function StructureLauncher.delKeyword>, 'write': <function StructureLauncher.write>, 'hasKeyword': <function StructureLauncher.hasKeyword>, 'run': <function StructureLauncher.run>, '__dict__': <attribute '__dict__' of 'StructureLauncher' objects>, '__weakref__': <attribute '__weakref__' of 'StructureLauncher' objects>})¶
-
__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.structure_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)
-