Package schrodinger :: Package application :: Package mopac :: Module structure_launchers :: Class StructureLauncher
[hide private]
[frames] | no frames]

Class StructureLauncher

object --+
         |
        StructureLauncher

A 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.

Instance Methods [hide private]
 
__init__(self, mopac_launcher, method, minimize=True, settings=None, keywords='')
x.__init__(...) initializes x; see help(type(x)) for signature
 
setKeyword(self, key, value=True, raise_conflicts=False)
Set the MOPAC keyword to the provided value.
 
getValue(self, key)
Get the value for the provided keyword, whether it was provided a key/value pair or in a MOPAC keywords string.
 
delKeyword(self, key)
Delete the keyword from the keywords specification and the kwdict dictionary.
 
write(self, structure, filename, logger=None)
Write a MOPAC input file based on the current keyword argument settings and the provided Structure object.
 
hasKeyword(self, 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(self, structure, jobname=None, input_file=False, tmpdir='', scratch_cleanup='remove', save_output_file=False, logger=None)
Run a MOPAC calculation on the provided structure given the object's current settings.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CHARGE = 'CHARGE'
  MMOK = 'MMOK'
  NOMM = 'NOMM'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mopac_launcher, method, minimize=True, settings=None, keywords='')
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

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.
Overrides: object.__init__

setKeyword(self, 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(self, 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.

write(self, structure, filename, logger=None)

 

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.
  • logger (logging.Logger) - If provided, will log warnings about problematic settings.