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.
-
class
schrodinger.application.mopac.structure_launchers.
StructureLauncher
(mopac_launcher, method, minimize=True, settings=None, keywords='')¶ Bases:
object
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.
-
CHARGE
= 'CHARGE'¶
-
MMOK
= 'MMOK'¶
-
NOMM
= 'NOMM'¶
-
delKeyword
(key)¶ Delete the keyword from the keywords specification and the kwdict dictionary.
-
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.
-
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.
-
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.
-
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.
-
-
exception
schrodinger.application.mopac.structure_launchers.
StructureLauncherError
¶ Bases:
exceptions.Exception