schrodinger.application.mopac.mopac_launchers module

This module contains classes for launching different MOPAC versions.

exception schrodinger.application.mopac.mopac_launchers.MopacLicenseError

Bases: Exception

class schrodinger.application.mopac.mopac_launchers.MopacLauncher

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:
  1. MopacLauncher71
  2. MopacLauncher2012
default_method
valid_methods
method_synonyms
extra_keywords
results
run(inputfile, structure=None)

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
Return type:MopacResults object
write_mop_file(ct, mopfile, method=None, geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)

Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.

Parameters:
  • ct (schrodinger.structure.Structure) – The structure 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

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.

default_method
valid_methods
method_synonyms
extra_keywords
results
write_mop_file(ct, mopfile, method='MNDO', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)

Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.

Parameters:
  • ct (schrodinger.structure.Structure) – The structure 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(inputfile, structure=None)

Run a MOPAC calculation in the local directory with a .mop input file. The optional Structure object is updated with the output data. Return a MopacResults object.

class schrodinger.application.mopac.mopac_launchers.MopacLauncher2012

Bases: schrodinger.application.mopac.mopac_launchers.MopacLauncher

This is the API for executing the MOPAC2012 backend as an external binary.

MOPAC_EXEC = 'MOPAC2012.exe'
default_method
valid_methods
method_synonyms
extra_keywords
results
write_mop_file(ct, mopfile, method='RM1', geopt=True, keywords='', plotMO=None, gridres=None, gridext=None)

Write a new .mop MOPAC input file based on a Structure object and input keywords and settings.

Parameters:
  • ct (schrodinger.structure.Structure) – The structure 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(inputfile, structure=None)

Run a MOPAC calculation in the local directory with a .mop input file. The optional Structure object is updated with the output data. Return a MopacResults object.

Parameters:inputfile (str) – name of .mop input file (without suffix)
schrodinger.application.mopac.mopac_launchers.get_mopac_launcher(version)

Return a MopacLauncher object for the requested MOPAC version.

schrodinger.application.mopac.mopac_launchers.get_mopac_results_instance(version)

Return a MopacResults object for the requested MOPAC version.