[ase-users] Atoms object

Eric Smoll ericsmoll at gmail.com
Sun Nov 16 19:51:06 CET 2014


Hello ASE users,

I am interested in storing force information in an atoms object. What is
the preferred way to do this? The "set_array" method? In the Atoms class, I
see the momenta set as follows:

self.set_array('momenta', momenta, float, (3,))


My attempts to make use of this method fail:

>>> test=np.arange(9).reshape((3,3))
>>> test
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
>>> a.set_array('test', test, float, (3,3))
ValueError: Array has wrong length: 3 != 0.


Best
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20141116/646cc626/attachment.html>


More information about the ase-users mailing list