Dear all,
I have some question about using ASE tools for CP2K.
I want to perform the vibration analysis using ASE interface, because some of the atoms of my system should be constrained.
In this link, S Ling suggested to use the CP2K/ASE interface in this situation.
However, when I use the Infrared() function, following error message occurs.
File "test.py", line 75, in <module>
main()
File "test.py", line 72, in main
ir.run()
File "/home/chanwoo/PROGRAM/ASE/ase/ase/vibrations/vibrations.py", line 129, in run
self.calculate(filename, fd)
File "/home/chanwoo/PROGRAM/ASE/ase/ase/vibrations/vibrations.py", line 146, in calculate
dipole = self.calc.get_dipole_moment(self.atoms)
File "/home/chanwoo/PROGRAM/ASE/ase/ase/calculators/calculator.py", line 361, in get_dipole_moment
return self.get_property('dipole', atoms)
File "/home/chanwoo/PROGRAM/ASE/ase/ase/calculators/calculator.py", line 374, in get_property
raise NotImplementedError
NotImplementedError
I think that a dipole moment of molecules is needed when IR intensity is calculated, but the CP2K/ASE interface doesn't support the dipole moment calculation.
Is there any method to implement the Infrared function?
I would appreciate for any suggestions and comments.
The python script for calculating normal modes is as follows.
test.py
#!/usr/bin/python
from __future__ import division, print_function
import os
from ase.structure import molecule
from ase.optimize import BFGS
from ase.calculators.cp2k import CP2K
from ase.vibrations import Vibrations
from ase.vibrations import Infrared
inp="""
&FORCE_EVAL
METHOD Quickstep
&DFT
&PRINT
&MOMENTS
PERIODIC FALSE
&END
&END
BASIS_SET_FILE_NAME BASIS_MOLOPT
POTENTIAL_FILE_NAME GTH_POTENTIALS
&MGRID
CUTOFF 400
&END MGRID
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&POISSON
PERIODIC NONE
PSOLVER MT
&END POISSON
&END DFT
&SUBSYS
&KIND O
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&KIND H
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-PBE-q1
&END KIND
&END SUBSYS
&END FORCE_EVAL
"""
def main():
calc = CP2K(basis_set=None,
basis_set_file=None,
max_scf=None,
charge=None,
cutoff=None,
force_eval_method=None,
potential_file=None,
poisson_solver=None,
pseudo_potential=None,
stress_tensor=False,
uks=None,
xc=None,
label='test_H2O_GOPT', inp=inp)
h2o = molecule('H2O', calculator = calc)
h2o.center(vacuum=2.0)
BFGS(h2o).run()
print(h2o.get_potential_energy())
vib = Vibrations(h2o)
vib.run()
vib.summary()
ir = Infrared(h2o)
ir.run()
ir.summary()
main()