[ase-users] gaussian calculator prints out 'force' keyword, and CCSD(T) doesn't work due to an error reading "dipole"

Martin Rahm martinr at kth.se
Wed Feb 3 22:04:21 CET 2016


Hi everyone,

I've found two peculiarities on the implementation of the gaussian
calculator. First, ASE produces the keyword "force" without me asking for
it, causing unnecessary calculations.

The force keyword also makes it impossible to run single point CCSD(T), as
analytical gradients aren't available here.

When running CCSD(T) (using force='enonly'), ase nevertheless crashes, due
to it not being able to read the output 'dipole' from the gaussian output.
This works with DFT and HF. The latter traceback is below, followed by my
input.

Help is greatly appreciated!

Regards,
Martin

Traceback (most recent call last):

  File "./g09-scan-distance.py", line 50, in <module>

    e = atoms.get_potential_energy() # Comment out for analysis only

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/atoms.py",
line 640, in get_potential_energy

    energy = self._calc.get_potential_energy(self)

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/calculators/calculator.py",
line 347, in get_potential_energy

    energy = self.get_property('energy', atoms)

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/calculators/calculator.py",
line 387, in get_property

    self.calculate(atoms, [name], system_changes)

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/calculators/calculator.py",
line 500, in calculate

    self.read_results()

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/calculators/gaussian.py",
line 281, in read_results

    self.results['dipole'] = read_gaussian_out(filename, quantity='dipole')

  File
"/Users/martin/Library/Python/2.7/lib/python/site-packages/ase/io/gaussian.py",
line 97, in read_gaussian_out

    return np.array(data['Dipole'])

KeyError: 'Dipole'


Trimmed down script, showing only imports and the calculation stage (which
works for everything except CCSD(T)):

from ase import *

from ase.calculators.gaussian import Gaussian

from ase.io import *

from ase.structure import molecule

    atoms = Atoms('HH', positions=[(0,0,0),(0,0,x)])


    calc=Gaussian(label=name0,

                  chk="{0}.chk".format(name0),

                  mem='400mb',

                  #force='enonly', uncommented to get CCSD(T) to run..



                  command="g09 {0}.com > {0}.log".format(name0),

                  nproc=1,

                  multiplicity=1,

                  charge=0,

                  method= 'CCSD(T)',

                  basis= 'aug-cc-pVTZ',

                  extra=None)


    atoms.set_calculator(calc)

    calc.write_input(atoms)

    e = atoms.get_potential_energy()


This results in the following gaussian input (first line only):

 #p CCSD(T)/aug-cc-pVTZ force


Or results in the above Dipole-related error if the force='enonly' line is
uncommented.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20160203/558310bd/attachment.html>


More information about the ase-users mailing list