git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11906 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-05-02 21:47:08 +00:00
parent 5e0c91dc3e
commit 19267785f5
16 changed files with 57 additions and 38 deletions

View File

@ -540,12 +540,12 @@ from ctypes import *
natoms = lmp.get_natoms()
n3 = 3*natoms
x = (n3*c_double)()
x[0] = x coord of atom with ID 1
x[1] = y coord of atom with ID 1
x[2] = z coord of atom with ID 1
x[3] = x coord of atom with ID 2
x\[0\] = x coord of atom with ID 1
x\[1\] = y coord of atom with ID 1
x\[2\] = z coord of atom with ID 1
x\[3\] = x coord of atom with ID 2
...
x[n3-1] = z coord of atom with ID natoms
x\[n3-1\] = z coord of atom with ID natoms
lmp.scatter_coords("x",1,3,x) :pre
Alternatively, you can just change values in the vector returned by