Skip to content

Dimer method issue #58

@mikejwaters

Description

@mikejwaters

Hi, I'm trying to use ASE's dimer method to find saddle points as part of a larger workflow. The dimer method should work on a closely spaced pair of images of the same system. Due to their close proximity, the optimization procedure should behave like a the optimization of a single image, i.e. a series of small displacements. No parallel image is treatment needed. It appears that somewhere in the ASE code, it's setting chemical symbols a second time which rightly causes VaspInteractive to throw an error. Is there a way I can have VaspInteractive ignore this chemical symbol update? The dimer method doesn't change the order atoms in the system, anyway.

I am using the master branch of ASE and v0.1.0rc0 of VaspInteractive

Here's the traceback:

Traceback (most recent call last):
  File "/home/mjwaters/NbTiZr_tests/OTiZrNb_MLIPs/barrier_learning/DFT_test_set/structures/random_occupancy/0/../../../delete_relax_ends_and_dimer_for_dft_test_set.py", line 525, in <module>
    dim_rlx.run(fmax = fmax, steps=max_dimer_steps)
  File "/home/mjwaters/software/ase/ase/optimize/optimize.py", line 430, in run
    return Dynamics.run(self, steps=steps)
  File "/home/mjwaters/software/ase/ase/optimize/optimize.py", line 275, in run
    for converged in Dynamics.irun(self, steps=steps):
  File "/home/mjwaters/software/ase/ase/optimize/optimize.py", line 246, in irun
    self.step()
  File "/home/mjwaters/software/ase/ase/mep/dimer.py", line 1047, in step
    f0tp = self.dimeratoms.get_projected_forces(r0t)
  File "/home/mjwaters/software/ase/ase/mep/dimer.py", line 708, in get_projected_forces
    forces = self.get_forces(real=True, pos=pos).copy()
  File "/home/mjwaters/software/ase/ase/mep/dimer.py", line 671, in get_forces
    forces = self.atoms.get_forces()
  File "/home/mjwaters/software/ase/ase/atoms.py", line 818, in get_forces
    forces = self._calc.get_forces(self)
  File "/home/mjwaters/software/ase/ase/calculators/abc.py", line 30, in get_forces
    return self.get_property('forces', atoms)
  File "/home/mjwaters/software/ase/ase/calculators/calculator.py", line 538, in get_property
    self.calculate(atoms, [name], system_changes)
  File "/home/mjwaters/.local/lib/python3.10/site-packages/vasp_interactive/vasp_interactive.py", line 738, in calculate
    raise NotImplementedError(
NotImplementedError: VaspInteractive does not support change of chemical formula. Please create a new calculator instance or use standard Vasp calculator
Trying to close the VASP stream but encountered error: 
Traceback (most recent call last):
  File "/home/mjwaters/.local/lib/python3.10/site-packages/vasp_interactive/vasp_interactive.py", line 335, in _txt_outstream
    out = open(txt, "a")
NameError: name 'open' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mjwaters/.local/lib/python3.10/site-packages/vasp_interactive/vasp_interactive.py", line 1015, in _force_kill_process
    self.close()
  File "/home/mjwaters/.local/lib/python3.10/site-packages/vasp_interactive/vasp_interactive.py", line 588, in close
    with self._txt_outstream() as out:
UnboundLocalError: local variable 'out' referenced before assignment

Will now force closing the VASP process. The OUTCAR and vasprun.xml outputs may be incomplete
/home/mjwaters/.local/lib/python3.10/site-packages/vasp_interactive/vasp_interactive.py:621: UserWarning: VASP process no longer exists. Will reset the calculator.

Thanks,
-Mike

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions