LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Accessing Interatomic distances from python via lammps python library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Accessing Interatomic distances from python via lammps python library


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 19 Oct 2017 12:54:55 -0400

On Thu, Oct 19, 2017 at 11:52 AM, Dundar Yilmaz <duy42@...122...> wrote:
> Hi LAMMPS Users:
> I am trying to develop an analysis project which runs lammps simulations
> from a python code via python library.

> Is there anyway to access already calculated interatomic distances from
> python side as a pointer similar to coordinates with command:
> lammps.extract_atom(“x”,3).

no. this information is not stored.

> If not is it possible to implement? I am trying to avoid additional overhead
> to calculate already calculated distances at the python side.

what you are asking does not make much sense. you are not considering
the overhead of storing and retrieving this information, which is
large, since the associated storage would be double that of the
neighbor lists, which is among the largest consumer of memory.

if you worry about performance this much, you should not implement
your analysis in python but as a compute style in c++ and then only
make the processed data available through the python interface. in the
compute, you can request a neighbor list, which already has
pre-selected all likely atoms to look at for computing the distances,
and for as long you can deal with the squared distance, the cost for
re-computing it is moderate (3 multiplies and 2 adds).

axel.


>
> Regards.
>
> Dundar Yilmaz, Ph. D.
> Post Doctoral Researcher
> Department of Mechanical and Nuclear Engineering
> 138 Research East Building
> Penn State University
> University Park, PA 16802
> duy42@...122...
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.