Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lammpslib.py - failing in test cases #6

Open
alvarovm opened this issue Feb 8, 2017 · 0 comments
Open

lammpslib.py - failing in test cases #6

alvarovm opened this issue Feb 8, 2017 · 0 comments

Comments

@alvarovm
Copy link

alvarovm commented Feb 8, 2017

The test case in https://svn.fysik.dtu.dk/projects/ase-extra/trunk/ase/test/testlammpslib.py
fails with lammps & ase trunk versions
the test.log has:
----------------------------------- test.log start -----------------------------------------------------------
LAMMPS (26 Jan 2017)
units metal
atom_style atomic
atom_modify map array sort 0 0
boundary p p s
region cell prism 0 5.72756492761 0 4.96021672914 0 0.0 0.0 0.0 0.0 units box
ERROR: Illegal region prism command (../region_prism.cpp:88)
Last command: region cell prism 0 5.72756492761 0 4.96021672914 0 0.0 0.0 0.0 0.0 units box
Total wall time: 0:00:00
----------------------------------- test.log end -----------------------------------------------------------

Similarly this case fails:

---------------------------------------- lammpslib-example.py Start---------------------------------------------------
from ase import Atom, Atoms
from lammpslib import LAMMPSlib
cmds = ["pair_style eam/alloy",
"pair_coeff * * NiAlH_jea.eam.alloy Al H"]
a = 4.05
al = Atoms([Atom('Al')], cell=(a, a, a), pbc=True)
h = Atom([Atom('H')])
alh = al + h
lammps = LAMMPSlib(lmpcmds = cmds, logfile='test.log')
alh.set_calculator(lammps)
print "Energy ", alh.get_potential_energy()
---------------------------------lammpslib-example.py End -----------------------------------------------------------

I get in the stdout this:
Traceback (most recent call last):
File "pymatnest-example.py", line 10, in
alh = al + h
File "/home/vama/install/local/anaconda2/lib/python2.7/site-packages/ase/atoms.py", line 866, in add
atoms += other
File "/home/vama/install/local/anaconda2/lib/python2.7/site-packages/ase/atoms.py", line 872, in extend
other = self.class([other])
File "/home/vama/install/local/anaconda2/lib/python2.7/site-packages/ase/atoms.py", line 150, in init
atoms = self.class(None, *data)
File "/home/vama/install/local/anaconda2/lib/python2.7/site-packages/ase/atoms.py", line 195, in init
self.new_array('numbers', numbers, int)
File "/home/vama/install/local/anaconda2/lib/python2.7/site-packages/ase/atoms.py", line 391, in new_array
a = np.array(a, dtype)
TypeError: long() argument must be a string or a number, not 'Atom'

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant