schrodinger.application.mopac.mopac_launchers module¶
This module contains classes for launching different MOPAC versions.
- exception schrodinger.application.mopac.mopac_launchers.MopacLicenseError[source]¶
Bases:
Exception
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.application.mopac.mopac_launchers.MopacLauncher[source]¶
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
- abstract property default_method¶
- abstract property valid_methods¶
- abstract property method_synonyms¶
- abstract property extra_keywords¶
- abstract property results¶
- abstract run(inputfile, structures=())[source]¶
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
structures (list) – list of Structure objects
- Returns
list(job status), outfile
- abstract write_mop_file(cts, mopfile, method=None, geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)[source]¶
Write a new .mop MOPAC input file based on a list of Structure objects and input keywords and settings to be applied to all structures.
- Parameters
cts (list of schrodinger.structure.Structure) – structures 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.
- class schrodinger.application.mopac.mopac_launchers.MopacLauncher71(energy_only=False)[source]¶
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__(energy_only=False)[source]¶
- Parameters
energy_only (bool) – parse only energies from the MOPAC jobs.
- property default_method¶
- property valid_methods¶
- property method_synonyms¶
- property extra_keywords¶
- property results¶
- write_mop_file(cts, mopfile, method='MNDO', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)[source]¶
Write a new .mop MOPAC input file based on a list of Structure objects and input keywords and settings to be applied to all structures.
- Parameters
cts (list of schrodinger.structure.Structure) – structures 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(mopfile, structures=())[source]¶
Run a MOPAC calculation in the local directory with a .mop input file.
Simple support for multiple structures in the input file is provided. It is important that the number of jobs in the input file matches the number of structures in the “structures” argument, as structure properties will be updated assuming a 1:1 mapping. Currently only total energies are updated when running with multiple structures.
- Parameters
mopfile (str) – name of .mop input file (without the suffix)
structures (list) – list of Structure objects
- Returns
list(job status)
- class schrodinger.application.mopac.mopac_launchers.MopacLauncherMain(energy_only=False)[source]¶
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__(energy_only=False)[source]¶
- Parameters
energy_only (bool) – parse only energies from the MOPAC jobs.
- property default_method¶
- property valid_methods¶
- property method_synonyms¶
- property extra_keywords¶
- property results¶
- write_mop_file(cts, mopfile, method='RM1', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)[source]¶
Write a new .mop MOPAC input file based on a list of Structure objects and input keywords and settings to be applied to all structures.
- Parameters
cts (list of schrodinger.structure.Structure) – Structures to use in writing the file.
mopfile (str) – name of .mop file to write (eg - infile.mop)
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(mopfile, structs=())[source]¶
Run a MOPAC calculation in the local directory with a .mop input file. If optional list of Structure instances is given, then parse the output files for data with which to populate the structure properties.
Support for multiple structures in the input file is provided. It is important that the number of jobs in the input file matches the number of structures in the “structures” argument, as structure properties will be updated assuming a 1:1 mapping.
- Parameters
mopfile (str) – name of .mop input file (eg - infile.mop)
structs (list) – list of Structure objects
- Returns
list(job status)
- schrodinger.application.mopac.mopac_launchers.get_mopac_launcher(version, energy_only=False)[source]¶
Return a MopacLauncher object for the requested MOPAC version.
The optional argument <energy_only> may be used to tell the launcher to only parse energies from the MOPAC job when populating any structure objects that might be provided.
- Parameters
version (str) – MOPAC version number
energy_only (bool) – parse only energies from the MOPAC jobs.