Mopac¶
- class ase.calculators.mopac.MOPAC(restart=None, ignore_bad_restart_file=<object object>, label='mopac', atoms=None, **kwargs)[source]¶
Construct MOPAC-calculator object.
Parameters:
- label: str
Prefix for filenames (label.mop, label.out, …)
Examples:
Use default values to do a single SCF calculation and print the forces (task=’1SCF GRADIENTS’):
>>> from ase.build import molecule >>> from ase.calculators.mopac import MOPAC >>> atoms = molecule('O2') >>> atoms.calc = MOPAC(label='O2') >>> atoms.get_potential_energy() >>> eigs = atoms.calc.get_eigenvalues() >>> somos = atoms.calc.get_somo_levels() >>> homo, lumo = atoms.calc.get_homo_lumo_levels()
Use the internal geometry optimization of Mopac:
>>> atoms = molecule('H2') >>> atoms.calc = MOPAC(label='H2', task='GRADIENTS') >>> atoms.get_potential_energy()
Read in and start from output file:
>>> atoms = MOPAC.read_atoms('H2') >>> atoms.calc.get_homo_lumo_levels()