[ase-users] Using ASE with lammps

Morten Nagel morten.nagel at helsinki.fi
Wed Aug 12 13:31:40 CEST 2015


Hi,

the lammps calculator only supports a subset of possible simulations of
lammps (e.g. only potentials which are parametrised for 'units metal',
which excludes the default reaxff potentials).  I presume you are trying
to run "doc/tutorials/N2Cu.py" with lammps;  I could not convince lammps
to use the comb3 potential (only default potential with Cu-N
interaction ?) and created therefore a modified version for H2 on top of
Cu (see attachment).  This uses the "CuH.bop.table"-file (has to be in
the same folder as H2Cu.py), but needs a small patch for
"ase/calculators/lammpsrun.py" (add in line 322 'comm_modify' to the
list with 'neighbor' and 'newton).

BR
 - Morten 

On Tue, 2015-08-11 at 19:44 +0000, Holesinger, Jacob Alan wrote:
> Hi all,
> Me and my mentor are new to ASE and we were trying to use it with LAMMPS.  However, we keep getting this OS error and are unsure how to deal with it
> 
> Traceback (most recent call last):
>   File "N2Cu.py", line 13, in <module>
>     e_slab = slab.get_potential_energy()
>   File "/Users/jacob/ase/ase/atoms.py", line 645, in get_potential_energy
>     energy = self._calc.get_potential_energy(self)
>   File "/Users/jacob/ase/ase/calculators/lammpsrun.py", line 134, in get_potential_energy
>     self.update(atoms)
>   File "/Users/jacob/ase/ase/calculators/lammpsrun.py", line 150, in update
>     self.calculate(atoms)
>   File "/Users/jacob/ase/ase/calculators/lammpsrun.py", line 168, in calculate
>     self.run()
>   File "/Users/jacob/ase/ase/calculators/lammpsrun.py", line 230, in run
>     stdin=PIPE, stdout=PIPE)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
>     errread, errwrite)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory
> 
> 
> Is this happening just because ASE cant find the LAMMPS executable?  I believe we have our LAMMPS_COMMAND variable pointing in the right place to our lmp_mac executable.
> Sorry if this is a stupid question.  We haven't really got our feet on the ground with this yet.
> 
> Thanks,
>  Jacob and Filip
> 
> 
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: H2Cu.py
Type: text/x-python
Size: 1567 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20150812/024dc910/attachment.py>


More information about the ase-users mailing list