<div dir="ltr">Dear all,<div><br></div><div>I have some question about using ASE tools for CP2K.</div><div>I want to perform the vibration analysis using ASE interface, because some of the atoms of my system should be constrained.</div><div>If some atoms are constrained, then normal CP2K calculation does not create the output file of .mol. (<a href="https://groups.google.com/forum/#!searchin/cp2k/vibration$20%7Csort:relevance/cp2k/vS_s3781V4g/_aryuXQrDAAJ">https://groups.google.com/forum/#!searchin/cp2k/vibration$20%7Csort:relevance/cp2k/vS_s3781V4g/_aryuXQrDAAJ</a>)</div><div>In this link, S Ling suggested to use the  CP2K/ASE interface in this situation.</div><div><br></div><div>When I follow the tutorial (<a href="https://wiki.fysik.dtu.dk/ase/ase/vibrations/vibrations.html?highlight=vibration">https://wiki.fysik.dtu.dk/ase/ase/vibrations/vibrations.html?highlight=vibration</a>), calculating vibrational normal modes function, Vibrations() works.</div><div>However, when I use the Infrared() function, following error message occurs.</div><div><br></div><div><div>  File "test.py", line 75, in <module></div><div>    main()</div><div>  File "test.py", line 72, in main</div><div>    ir.run()</div><div>  File "/home/chanwoo/PROGRAM/ASE/ase/ase/vibrations/vibrations.py", line 129, in run</div><div>    self.calculate(filename, fd)</div><div>  File "/home/chanwoo/PROGRAM/ASE/ase/ase/vibrations/vibrations.py", line 146, in calculate</div><div>    dipole = self.calc.get_dipole_moment(self.atoms)</div><div>  File "/home/chanwoo/PROGRAM/ASE/ase/ase/calculators/calculator.py", line 361, in get_dipole_moment</div><div>    return self.get_property('dipole', atoms)</div><div>  File "/home/chanwoo/PROGRAM/ASE/ase/ase/calculators/calculator.py", line 374, in get_property</div><div>    raise NotImplementedError</div><div>NotImplementedError</div></div><div><br></div><div>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.</div><div>Is there any method to implement the Infrared function?</div><div>I would appreciate for any suggestions and comments.</div><div><br></div><div>The python script for calculating normal modes is as follows.</div><div><br></div><div><b>test.py</b></div><div><b><br></b></div><div><div>#!/usr/bin/python</div><div>from __future__ import division, print_function</div><div>import os</div><div><br></div><div>from ase.structure import molecule</div><div>from ase.optimize import BFGS</div><div>from ase.calculators.cp2k import CP2K</div><div>from ase.vibrations import Vibrations</div><div>from ase.vibrations import Infrared</div><div><br></div><div>inp="""</div><div>&FORCE_EVAL</div><div>    METHOD Quickstep</div><div>    &DFT</div><div>        &PRINT</div><div>            &MOMENTS</div><div>                PERIODIC    FALSE</div><div>            &END</div><div>        &END</div><div><br></div><div>        BASIS_SET_FILE_NAME BASIS_MOLOPT</div><div>        POTENTIAL_FILE_NAME GTH_POTENTIALS</div><div>        &MGRID</div><div>            CUTOFF 400</div><div>        &END MGRID</div><div>        &XC</div><div>            &XC_FUNCTIONAL PBE</div><div>            &END XC_FUNCTIONAL</div><div>        &END XC</div><div>        &POISSON</div><div>            PERIODIC NONE</div><div>            PSOLVER MT</div><div>        &END POISSON</div><div>    &END DFT</div><div>    &SUBSYS</div><div>        &KIND O </div><div>            BASIS_SET DZVP-MOLOPT-SR-GTH</div><div>            POTENTIAL GTH-PBE-q6</div><div>        &END KIND</div><div><br></div><div>        &KIND H</div><div>            BASIS_SET DZVP-MOLOPT-SR-GTH</div><div>            POTENTIAL GTH-PBE-q1</div><div>        &END KIND</div><div>    &END SUBSYS</div><div>&END FORCE_EVAL</div><div>"""</div><div><br></div><div>def main():</div><div>    calc = CP2K(basis_set=None,</div><div>            basis_set_file=None,</div><div>            max_scf=None,</div><div>            charge=None,</div><div>            cutoff=None,</div><div>            force_eval_method=None,</div><div>            potential_file=None,</div><div>            poisson_solver=None,</div><div>            pseudo_potential=None,</div><div>            stress_tensor=False,</div><div>            uks=None,</div><div>            xc=None,</div><div>            label='test_H2O_GOPT', inp=inp)</div><div>    h2o = molecule('H2O', calculator = calc)</div><div>    h2o.center(vacuum=2.0)</div><div>    BFGS(h2o).run()</div><div>    print(h2o.get_potential_energy())</div><div>    vib = Vibrations(h2o)</div><div>    vib.run()</div><div>    vib.summary()</div><div>    ir = Infrared(h2o)</div><div>    ir.run()</div><div>    ir.summary()</div><div><br></div><div>main()</div></div><div><br></div></div>