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 14:19:50 -0400

On Thu, Oct 19, 2017 at 2:00 PM, Dundar Yilmaz <duy42@...122...> wrote:
> Hi,
> Thanks for the advise.
> I am trying to access the neighbor list with :
>
> input script:
> compute pairs all pair/local natom1 natom2
>
> From the python side I use:
>
> pairs=lmp.extract_compute(“pairs”,1,2)
>
> I receive Null Pointer access error.
> Since I am not an expert in C++ I am trying to avoid modifying C++ code as
> much as possible.

then you should not do what you are asking about.

> The reason for this is I am trying to record bond breaking/formation events
> and get a statistics out of it.

that information is readily available through fix reax/c/species and
fix reax/c/bonds and you can very easily do your statistical analysis
by parsing the output of those commands in post-processing. this is an
approach that makes sense.

what you seem to be trying makes no sense, you will have to re-do a
lot of work that those fixes have already included and you'll do this
at python speed, i.e. 100x slower than C++ code, and yet you have
provided no explanation why post-processing would be inadequate.

besides, if you are willing to go through such great pains to avoid
having to program c++, it will be the lesser evil to spend some time
*learning* c++ and then have that skill available in your toolchest
for future issues as well.

axel.

> Cheers.
>
> 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...
>
>
>



-- 
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.