[ase-users] Restarting NEB
Marcin Dulak
Marcin.Dulak at fysik.dtu.dk
Mon Nov 17 14:49:52 CET 2014
On 11/17/2014 01:49 PM, Roberto Schimmenti wrote:
> First of all thank you for your suggestion;
>
> I tried with something like:
>
> initial = read('initial.traj')
> final = read('final.traj')
> constraint = FixAtoms(mask=[atom.tag > 1 for atom in initial])
>
>
> calc = Siesta(label='initial',
> xc='KBM',
> kpts=[10,10,1])
>
>
> images = io.read('neb.traj at -5:')
>
> for image in images[1:-1]:
> image.set_calculator(calc)
> image.set_constraint(constraint)
>
> neb = NEB(images, k=[0.15, 0.15, 0.25, 0.15, 0.15], climb=True)
> qn = BFGS(neb, trajectory='neb2.traj')
use the log file and compare the printed energy/force - the last step of
the first optimization should correspond
to the first one of the new one:
qn = BFGS(neb, trajectory='neb2.traj', logfile='neb2.qn')
> qn.run(fmax=0.04)
>
> but I can argue from the out file that the neb restart the calculation
> from the beginning; I tried also to delete the initial and final images
> read lines with no results; moreover with this adjustement I can't specify
> any costraint even if I change the for cycle with something like:
>
> images = io.read('neb.traj at -5:')
> constraint = FixAtoms(mask=[atom.tag > 1 for atom in images])
constraint = FixAtoms(mask=[atom.tag > 1 for atom in images[0]])
I think constraints will be inherited from neb.traj so no need to set them again.
Best regards,
Marcin
> for image in images[1:-1]:
> image.set_calculator(calc)
> image.set_constraint(constraint)
>
> Any suggestions???
>
> Thank you
>> On 11/12/2014 01:53 PM, Roberto Schimmenti wrote:
>>> Dear ASE-users
>>>
>>> I'm encountering some problem for restarting NEB calculations using
>>> ASE+SIESTA; I know that there are several topic concerning this in the
>>> mailing list but I would like a more detailed explanation unpon setting
>>> up
>>> a NEB calculation using old trajectory file.
>>>
>>>
>>> This is one of my typical input file:
>>>
>>> initial = read('initial.traj')
>>> final = read('final.traj')
>>> constraint = FixAtoms(mask=[atom.tag > 1 for atom in initial])
>>>
>>>
>>> calc = Siesta(label='systemxx',
>>> xc='KBM',
>>> ....)
>>>
>>> images = [initial]
>>> for i in range(4):
>>> image = initial.copy()
>>> image.set_calculator(calc)
>>> image.set_constraint(constraint)
>>> images.append(image)
>>> images.append(final)
>>>
>>> neb = NEB(images,k=[0.15,0.15,0.25,0.15,0.15],climb=True)
>>> neb.interpolate()
>>> qn = BFGS(neb, trajectory='neb.traj')
>>> qn.run(fmax=0.04)
>>>
>>>
>>> With this I can obtain a neb.traj file in wich all the path optimization
>>> are included.
>>>
>>> I know from the manual that it's possible to use images=
>>> io.read('neb.traj'@-5) but I don't understand how this can be used for
>>> taking into account only the last iterations of the trajectory file.
>>> Could
>>> you provide me more complete example?
>> In your case (with 6 images) that should be something like:
>>
>> images = io.read('neb.traj at -6:')
>> for image in images[1:-1]:
>> image.set_calculator(calc)
>> image.set_constraint(constraint)
>>
>> neb = NEB(images, k=[0.15, 0.15, 0.25, 0.15, 0.15], climb=True)
>> qn = BFGS(neb, trajectory='neb2.traj')
>> qn.run(fmax=0.04)
>>
>> Check first with ase-gui that you have the right path:
>>
>> ase-gui neb.traj at -6:
>>
>> Jens Jørgen
>>
>
More information about the ase-users
mailing list