McStasMcXtrace / iFit

a simple library to analyze data (with McCode and Phonons/DFT hooks). :warning: this project has been moved to https://gitlab.com/soleil-data-treatment/soleil-software-projects/remote-desktop
http://ifit.mccode.org
Other
5 stars 5 forks source link

Models: Phonons: use ASE Espresso calculator if satisfactory #132

Closed farhi closed 6 years ago

farhi commented 6 years ago

Should test if new calculator is similar to that of Jochym. If so, use it (no separate install then).

farhi commented 6 years ago

Coulc probably as well remove the PHON implementation when successfully ported to ASE.

farhi commented 6 years ago

a new NotImplementedError appears with ASE 3.15. Requires to specify the pseudopotentials. Can port stuff from QE/PHON side. However, even with QEutil, there seems to be an issuewith 3.14 and 3.15 ??!!

farhi commented 6 years ago

ASE 3.14 and 3.15, QEutil error:

s=sqw_phonons([ ifitpath 'Data/POSCAR_Al'],'metal','qe');

sqw_phonons_check: starting phonons computation [10-Oct-2017 17:34:33]
  directory  = /tmp/tp2360147a_d87f_42f8_b0d9_86336525cbae
  material   = /home/farhi/dev/iFit/Objects/@iData/../../Data/POSCAR_Al
  calculator = quantumespresso_ase using 24 cores
Exporting structure to usual formats...

Exporting structure properties...

  auto: supercell=3
  auto: kpoints=  4
  kpoints_density=  1728
sqw_phonons_get_forces: computing Hellmann-Feynman forces...
calc = QuantumEspresso(use_symmetry=True, tstress=True, tprnfor=True, nspin=2,  label=atoms.get_chemical_formula(), wdir="/tmp/tp2360147a_d87f_42f8_b0d9_86336525cbae", occupations="smearing", smearing="methfessel-paxton", degauss=0.0198529, kpts=(4,4,4), xc="PBE", diagonalization="cg", conv_thr=0.000010, mixing_beta=0.700000, mixing_mode = "plain", ecutwfc=15*len(set(atoms.get_atomic_numbers())), procs=24)
Writing phonon.eq.pckl
[ASE] Equilibrium forces min=0 max=0
Moving  atom #0   Al     to  [0.0070710678118654745, 0.0070710678118654745, 0.0]
Traceback (most recent call last):
  File "/tmp/tp2360147a_d87f_42f8_b0d9_86336525cbae/sqw_phonons_forces_iterate.py", line 25, in <module>
    ret=ifit.phonopy_run(ph, single=True)
  File "/tmp/tp2360147a_d87f_42f8_b0d9_86336525cbae/ifit.py", line 862, in phonopy_run
    set_of_forces, flag, nb_of_iterations = phonopy_run_calculate(phonon, phonpy, supercell, single)
  File "/tmp/tp2360147a_d87f_42f8_b0d9_86336525cbae/ifit.py", line 972, in phonopy_run_calculate
    forces = cell.get_forces()
  File "/usr/local/lib/python2.7/dist-packages/ase/atoms.py", line 731, in get_forces
    forces = self._calc.get_forces(self)
  File "/usr/local/lib/python2.7/dist-packages/ase/calculators/calculator.py", line 426, in get_forces
    return self.get_property('forces', atoms)
  File "/usr/local/lib/python2.7/dist-packages/ase/calculators/calculator.py", line 459, in get_property
    self.calculate(atoms, [name], system_changes)
  File "/usr/lib/python2.7/dist-packages/qeutil/__init__.py", line 215, in calculate
    self.run_calculation(atoms, properties, system_changes)
  File "/usr/lib/python2.7/dist-packages/qeutil/__init__.py", line 201, in run_calculation
    FileIOCalculator.calculate(self, atoms, properties, system_changes)
  File "/usr/local/lib/python2.7/dist-packages/ase/calculators/calculator.py", line 611, in calculate
    self.write_input(self.atoms, properties, system_changes)
  File "/usr/lib/python2.7/dist-packages/qeutil/__init__.py", line 230, in write_input
    write_pw_in(self.directory, atoms, self.parameters)
  File "/usr/lib/python2.7/dist-packages/qeutil/writers.py", line 229, in write_pw_in
    primcell=write_cell_params(fh,a,p)
  File "/usr/lib/python2.7/dist-packages/qeutil/writers.py", line 192, in write_cell_params
    raise NotImplementedError
NotImplementedError

this is related to spglib not finding the spacegroup in QEutil

farhi commented 6 years ago

OK, the last bug report in this ticket is because the QE calculator was used with:

instead of

OK, back on track. Now looking for new QE interface.

farhi commented 6 years ago

Fully functional with commit https://github.com/McStasMcXtrace/iFit/commit/5f307da99e6745288fb01b572957cd1f0df1764d