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: Steve Plimpton <sjplimp@...24...>
Date: Mon, 6 Nov 2017 11:00:48 -0700

The pair/local compute stores "local" data.

So in your extract_compute() call you want style=2
(see the library.cpp doc info on lammps_extract_compute()
which is the 2nd arg (you have 1).

That's likely why you're getting a NULL returned.

Steve

On Thu, Oct 19, 2017 at 12: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.
The reason for this is I am trying to record bond breaking/formation events and get a statistics out of it.
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




------------------------------------------------------------------------------
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@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users