[CP2K:8206] CP2K/ASE vibration analysis question
Ole Schütt
o... at schuett.name
Wed Oct 5 11:42:06 UTC 2016
Dear Chanwoo,
adding support for get_dipole_moment() to the ASE Calculator is probably
rather straightforward. While I would be happy to do the python part,
I'm not quite sure how things work on the CP2K side. Therefore, I would
suggest you to first try to figuring out why CP2K does not print the
molden output in the first place:
https://github.com/cp2k/cp2k/blob/master/cp2k/src/motion/vibrational_analysis.F#L454
Cheers,
Ole
On 2016-10-04 04:23, Chanwoo Noh wrote:
> 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.
> If some atoms are constrained, then normal CP2K calculation does not
> create the output file of .mol.
> (https://groups.google.com/forum/#!searchin/cp2k/vibration$20%7Csort:relevance/cp2k/vS_s3781V4g/_aryuXQrDAAJ
> [1])
> In this link, S Ling suggested to use the CP2K/ASE interface in this
> situation.
>
> When I follow the tutorial
> (https://wiki.fysik.dtu.dk/ase/ase/vibrations/vibrations.html?highlight=vibration
> [2]), calculating vibrational normal modes function, Vibrations()
> works.
> 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()
>
> --
> You received this message because you are subscribed to the Google
> Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cp2k+uns... at googlegroups.com.
> To post to this group, send email to cp... at googlegroups.com.
> Visit this group at https://groups.google.com/group/cp2k [3].
> For more options, visit https://groups.google.com/d/optout [4].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/forum/#!searchin/cp2k/vibration$20%7Csort:relevance/cp2k/vS_s3781V4g/_aryuXQrDAAJ
> [2]
> https://wiki.fysik.dtu.dk/ase/ase/vibrations/vibrations.html?highlight=vibration
> [3] https://groups.google.com/group/cp2k
> [4] https://groups.google.com/d/optout
More information about the CP2K-user
mailing list