MOPAC (standalone program)¶
Starting from AMS2019, MOPAC is fully integrated as an AMS engine. If you want to use the MOPAC engine in AMS2019, you should use
AMSJob (and not
MOPACJob). This page documents the interface to the standalone MOPAC program.
MOPAC (Molecular Orbital PACkage) is a semiempirical quantum chemistry program based on NDDO approximation. More information about the standalone MOPAC program can be found on its official website.
Preparing an instance of
MOPACJob follows general principles for
Information adjusting input file is stored in
myjob.settings.input branch, whereas a runscript is created based on contents of
The geometry of your system is supplied in the standard way: with the
The input format of the standalone MOPAC program is simple and straightforward: all the keywords adjusting parameters of your calculation are placed in the first line of the input file. Next two lines are left for user’s comments and then geometry of the system follows.
Since blocks and subblocks are not present in MOPAC’s input, the
`myjob.settings.input branch needs to have a flat structure, just like a regular dictionary, without any nested
The value of a particular key adjusts the way in which keywords are printed in the first line of the input file:
myjob.settings.input.keyword = Truewill print
myjob.settings.input.keyword = valuewill print
valuebeing casted to
myjob.settings.input.keyword = (val1, val2, ...)will print
keyword=(val1,val2,...)(when value is a tuple)
myjob.settings.input.keyword = [val1, val2, ...]will print
keyword(val1,val2,...)(when value is a list)
Moreover, if the keyword
AUX is not supplied by the user, it is automatically inserted in the form
AUX(0,PRECISSION=9) (for compatibility with AMSSuite GUI).
The standalone MOPAC program allows to freeze each coordinate of each atom separately.
This information is extracted from
mopac_freeze key in each atom’s properties.
If present, this key should contain a string with all axes that you wish to freeze for a particular atom:
mol = Molecule('system.xyz') mol.properties.mopac_freeze = 'x' #freeze x coordinate of atom 1 mol.properties.mopac_freeze = 'yz' #freeze y and z coordinates of atom 2 mol.properties.mopac_freeze = 'xyz' #freeze atom 3
MOPACJob(molecule=None, name='plamsjob', settings=None, depend=None)¶
A class representing a single computational job with MOPAC.
Transform the contents of
settingsinto the first line of MOPAC input. Print the molecular coordinates together with frozen coordinate flags.
Generate a MOPAC runscript.
The name of the MOPAC executable is taken from class attribute
MOPACJob._command. If you experience problems running MOPAC, check if that value corresponds to the name of the executable and this executable is visible in your
$PATH(in case of AMSuite it’s in
$AMSBIN). Note that a bare MOPAC executable should be used here, please avoid using any wrappers.
The execution of MOPAC binary is followed by calling a simple command line tool
tokfwhich reads various output text files produced by MOPAC and collects all the data in a binary KF file. See KF files for details.
Grep standard output for
* JOB ENDED NORMALLY *.
A class for results of computation done with MOPAC.
This class inherits all methods from
In case of a MOPAC job, preparation is much different from other programs of AMSuite, but the result handling is quite similar due to presence of KF files. Therefore
MOPACResultsis a subclass of
MOPACJobis not a subclass of
Return a list of atomic numbers, in the input order. Abstract method.