[ase-users] Save "forces" from GULP/QuasiNewton
Dong gi Kang
kdg4206 at gmail.com
Fri Dec 18 21:12:57 CET 2020
Dear ASE users,
I would like to save “forces”, “positions” in every step of optimisation process from GULP calculations.
However, it only saves “positions” of atoms, no energy and forces even though force can be calculated.
(One atom calculation (gulp) with the same script gives an error: PropertyNotImplementedError: forces not present in this calculation)
With the command I could save force component from FHI-aims calculation but not from GULP.
Do I have to add more command to get the force component?
This is the saved .xyz data that converted from .traj file.
4
Properties=species:S:1:pos:R:3 pbc="F F F"
Zn 2.99999999 -0.00000001 0.00000001
Zn 0.00000000 3.00000000 0.00000000
O -0.00000008 -0.00000004 3.00000002
O -2.00000003 -0.00000005 0.00000005
=================
~~~~#This is a part of the code that I used
cluster.calc = calc
dynamics = QuasiNewton(cluster) #trajectory='g_ZnO_n1.traj')
traj = Trajectory('g_ZnO_n1.traj', 'w', cluster)
dynamics.attach(traj.write, interval=1) # <----- save results every one fs
def forces():
a = cluster.get_forces()
print(a)
dynamics.attach(forces, interval=5)
dynamics.run(steps=600, fmax=0.0001)
dynamics.attach(forces, interval=5) produces
BFGSLineSearch: 86[598] 19:55:54 -48.088229* 22.3339
BFGSLineSearch: 87[603] 19:55:55 -48.088130* 22.3339
BFGSLineSearch: 88[608] 19:55:55 -48.088037* 22.3340
BFGSLineSearch: 89[613] 19:55:55 -48.087941* 22.3340
BFGSLineSearch: 90[618] 19:55:56 -48.087845* 22.3340
[[ -0.657599 -1.870524 6.558049]
[ -0. -0. -0. ]
[ -0.639623 0.210503 4.824076]
[-17.48983 -13.84042 1.165193]]
BFGSLineSearch: 91[623] 19:55:57 -48.087749* 22.3341
BFGSLineSearch: 92[628] 19:55:57 -48.087655* 22.3341
Many thanks,
Dong-gi Kang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201218/a1cc2b68/attachment.htm>
More information about the ase-users
mailing list