[ase-users] Unable to use LAMMPS via ASE
Jacob Madsen
jamad at fysik.dtu.dk
Tue Jun 28 16:16:20 CEST 2016
Dear Toma,
I got the same error as you using LAMMPSrun. I have tracked down the bug and submitted a merge request.
The fixed lammpsrun.py script is attached, the wiki example works for me with the changes made.
You may want to create the calculator as below, in order to inspect the LAMMPS code generated by ASE.
calc = LAMMPS(tmp_dir="dir_name", keep_tmp_files=True)
Best,
Jacob
________________________________
Fra: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at listserv.fysik.dtu.dk] på vegne af Toma Susi via ase-users [ase-users at listserv.fysik.dtu.dk]
Sendt: 28. juni 2016 13:00
Til: ase-users
Cc: jani.kotakoski at univie.ac.at; a1063348 at unet.univie.ac.at
Emne: Re: [ase-users] Unable to use LAMMPS via ASE
Dear users,
We would really appreciate any information on running LAMMPS via ASE, even if just to confirm this works for some software configuration.
Thank you,
Toma
On 22 Jun 2016, at 13:58, Toma Susi <toma.susi at univie.ac.at<mailto:toma.susi at univie.ac.at>> wrote:
Dear all,
We've been trying to use ASE with a LAMMPS calculator, both using the LAMMPSrun example (https://wiki.fysik.dtu.dk/ase/ase/calculators/lammpsrun.html) and the LAMMPSlib implentation (https://svn.fysik.dtu.dk/projects/ase-extra/trunk/ase/calculators/lammpslib.py) and the example found there.
Starting with the LAMMPSlib example script, first I should note that I get an error with just the atom addition "alh = al + h", but that's not the main issue.
If I try to run the script for just Al (or anything else), setting the calculator produces no error, but commands such as get_potential_energy() simply produce no output, and no errors, nothing.
---------
Turning then to the LAMMPSrun implementation. When we try to run the simple example on the ASE wiki, we get the following error:
>>> print(NaCl.get_stress())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/daryoush/.local/lib/python2.7/site-packages/ase/atoms.py", line 716, in get_stress
stress = self._calc.get_stress(self)
File "/home/daryoush/.local/lib/python2.7/site-packages/ase/calculators/lammpsrun.py", line 141, in get_stress
self.update(atoms)
File "/home/daryoush/.local/lib/python2.7/site-packages/ase/calculators/lammpsrun.py", line 149, in update
self.calculate(atoms)
File "/home/daryoush/.local/lib/python2.7/site-packages/ase/calculators/lammpsrun.py", line 167, in calculate
self.run()
File "/home/daryoush/.local/lib/python2.7/site-packages/ase/calculators/lammpsrun.py", line 270, in run
''.format(cwd,exitcode))
RuntimeError: LAMMPS exited in /tmp/LAMMPS-y73Ufn with exit code: /tmp/LAMMPS-y73Ufn.
The mentioned tmp directory is empty, so that probably explains the error, but why is it empty?
--------
Some software version info:
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2 (Debian)
ASE '3.11.0'
LAMMPS (25 Sep 2015)
We can run ASE with other classical potentials and standalone LAMMPS with no problems.
Could someone please try if the example scripts really run, or provide an example that does?
Many thanks,
Toma
________________________________
Dr. Toma Susi
Principal investigator
FWF Project HeQuCoG
University of Vienna, Austria
http://mostlyphysics.net<http://mostlyphysics.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20160628/e8eee16e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lammpsrun.py
Type: text/x-python
Size: 32752 bytes
Desc: lammpsrun.py
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20160628/e8eee16e/attachment-0001.py>
More information about the ase-users
mailing list