Commit 7e84879c authored by Steve Plimpton's avatar Steve Plimpton
Browse files

new options for log and sdata tools

parent ecfde8a1
Loading
Loading
Loading
Loading
+9
Changes for doc/log.html: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ l = log("file*") wildcard expands to multiple files
l = log("log.lammps",0)              two args = store filename, but don't read 
</PRE>
<PRE>  incomplete and duplicate thermo entries are deleted
  skip applied within individual files, def = 1 (no skip) 
</PRE>
<PRE>time = l.next()                      read new thermo info from file 
</PRE>
@@ -45,6 +46,14 @@ l = log("log.lammps",0) two args = store filename, but don't read
  return time stamp of last thermo read
  return -1 if no new thermo since last read 
</PRE>
<PRE>l.skip = 2                           only keep log data for every Nth run (def=1) 
</PRE>
<PRE>  applied within single log files
  use as follows:
    l = log(file,0)
    l.skip = 2
    l.read_all() 
</PRE>
<PRE>nvec = l.nvec                        # of vectors of thermo info
nlen = l.nlen                        length of each vectors
names = l.names                      list of vector names
+10 −1
Changes for doc/log.txt: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@ l = log("log1 log2.gz") can be gzipped
l = log("file*")                     wildcard expands to multiple files
l = log("log.lammps",0)              two args = store filename, but don't read :pre

  incomplete and duplicate thermo entries are deleted :pre
  incomplete and duplicate thermo entries are deleted
  skip applied within individual files, def = 1 (no skip) :pre

time = l.next()                      read new thermo info from file :pre

@@ -42,6 +43,14 @@ time = l.next() read new thermo info from file :pre
  return time stamp of last thermo read
  return -1 if no new thermo since last read :pre

l.skip = 2                           only keep log data for every Nth run (def=1) :pre

  applied within single log files
  use as follows:
    l = log(file,0)
    l.skip = 2
    l.read_all() :pre

nvec = l.nvec                        # of vectors of thermo info
nlen = l.nlen                        length of each vectors
names = l.names                      list of vector names
+21 −10
Changes for doc/sdata.html: 21 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -79,17 +79,18 @@ by SPARTA to track particle motion.
<P><B>Usage:</B>
</P>
<PRE>s = sdata()			   create a surf data object
s = sdata(ID,"mem.surf")           read in one or more SPARTA surf files
s = sdata(ID,"mem.surf")           read in one or more surf files
s = sdata(ID,"mem.part.gz mem.surf")  can be gzipped
s = sdata(ID,"mem.*")		   wildcard expands to multiple files
s.read(ID,"mem.surf")		   read in one or more data files 
</PRE>
<PRE>  all surf data in files becomes one surf with ID
  surf files contain the following kinds of entries in SPARTA format
  surf files contain the following kinds of entries in SPARTA or LAMMPS format
    points and lines (for 2d), points and triangles (for 3d)
  read() has same argument options as constructor 
</PRE>
<PRE>s.seed = 48379                     set random # seed (def = 12345)
<PRE>s.mode = "SPARTA" or "LAMMPS"      set format of in/out files (def = "SPARTA")
s.seed = 48379                     set random # seed (def = 12345)
s.circle(ID,x,y,r,n)               create a 2d circle with N lines and ID
s.rect(ID,x1,y1,x2,y2,nx,ny)       create a 2d rect, 2 corner pts, Nx,Ny segs 
s.tri(ID,x1,y1,x2,y2,x3,y3,n1,n2,n3)  create a 2d tri, 3 pts, N1,N2,N3 segs 
@@ -120,13 +121,20 @@ s.invert(ID) invert normal direction of surf
  rotation and scaling of surf are relative to its center point 
</PRE>
<PRE>s.join(ID,id1,id2,...)		   combine id1,id2,etc into new surf with ID 
s.delete(id1,id2,...)              delete one or more surfs
s.rename(ID,IDnew)                 rename a surf
s.copy(ID,IDnew) 	           create a new surf as copy of old surf 
</PRE>
<PRE>  join does not delete id1,id2,etc
  center for joined surf becomes center of bounding box of all points 
</PRE>
<PRE>s.refine(ID,size)                  refine surf to lines/tris less than size 
</PRE>
<PRE>  lines are halved recursively into 2 lines
  triangles are split by longest edge, inducing split in neighbor tri
    builds tri connectivity list to do this 
</PRE>
<PRE>s.delete(id1,id2,...)              delete one or more surfs
s.rename(ID,IDnew)                 rename a surf
s.copy(ID,IDnew) 	           create a new surf as copy of old surf 
</PRE>
<PRE>s.select(id1,id2,...)              select one or more surfs
s.select()                         select all surfs
s.unselect(id1,id2,...)            unselect one or more surfs
@@ -135,12 +143,15 @@ s.unselect() unselect all surfs
<PRE>  selection applies to write() and viz()
  surfs are selected by default when read or created 
</PRE>
<PRE>s.write("file")			   write all selected surfs to SPARTA file
s.write("file",id1,id2,...)	   write only listed & selected surfs to file 
<PRE>s.write("file",pflag=1,nfile=0,ids=<B></B>)	    write all selected surfs to file
s.write("file",pflag=1,nfile=0,ids=<B>id1,id2,...</B>)  write only listed & selected 
</PRE>
<PRE>  pflag = 1/0 to include/exclude Points section, default = 1
  nfile = write SPARTA multiproc-format file to Nfile >= 1 files 
</PRE>
<PRE>s.grid(xlo,xhi,ylo,yhi,ny,ny)      bounding box and Nx by Ny grid
s.grid(xlo,xhi,ylo,yhi,zlo,zhi,ny,ny,nz)   ditto for 3d
s.gridfile(xlo,xhi,ylo,yhi,file)   bbox and SPARTA-formatted parent grid file
s.gridfile(xlo,xhi,ylo,yhi,file)   bbox and SPARTA-format parent grid file
s.gridfile(xlo,xhi,ylo,yhi,zlo,zhi,file)   ditto for 3d 
</PRE>
<PRE>  grid command superpose a grid, for viz only
@@ -156,7 +167,7 @@ time,box,atoms,bonds,tris,lines = s.viz(index) return list of viz objects
    flag = -1 when iteration is done, 1 otherwise
  viz() returns info for selected objs for specified timestep index (must be 0)
    time = 0
    box = [xlo,ylo,zlo,xhi,yhi,zhi] = bounding box
    box = <B>xlo,ylo,zlo,xhi,yhi,zhi</B> = bounding box
    atoms = NULL
    bonds = NULL
    tris = id,type,x1,y1,z1,x2,y2,z2,x3,y3,z3,nx,ny,nz for each tri as 2d array
+21 −10
Changes for doc/sdata.txt: 21 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -76,16 +76,17 @@ by SPARTA to track particle motion.
[Usage:]

s = sdata()			   create a surf data object
s = sdata(ID,"mem.surf")           read in one or more SPARTA surf files
s = sdata(ID,"mem.surf")           read in one or more surf files
s = sdata(ID,"mem.part.gz mem.surf")  can be gzipped
s = sdata(ID,"mem.*")		   wildcard expands to multiple files
s.read(ID,"mem.surf")		   read in one or more data files :pre

  all surf data in files becomes one surf with ID
  surf files contain the following kinds of entries in SPARTA format
  surf files contain the following kinds of entries in SPARTA or LAMMPS format
    points and lines (for 2d), points and triangles (for 3d)
  read() has same argument options as constructor :pre

s.mode = "SPARTA" or "LAMMPS"      set format of in/out files (def = "SPARTA")
s.seed = 48379                     set random # seed (def = 12345)
s.circle(ID,x,y,r,n)               create a 2d circle with N lines and ID
s.rect(ID,x1,y1,x2,y2,nx,ny)       create a 2d rect, 2 corner pts, Nx,Ny segs 
@@ -116,14 +117,21 @@ s.invert(ID) invert normal direction of surf :pre
  default center for read-in surf is center of bounding box of all points
  rotation and scaling of surf are relative to its center point :pre

s.join(ID,id1,id2,...)		   combine id1,id2,etc into new surf with ID
s.delete(id1,id2,...)              delete one or more surfs
s.rename(ID,IDnew)                 rename a surf
s.copy(ID,IDnew) 	           create a new surf as copy of old surf :pre
s.join(ID,id1,id2,...)		   combine id1,id2,etc into new surf with ID :pre

  join does not delete id1,id2,etc
  center for joined surf becomes center of bounding box of all points :pre

s.refine(ID,size)                  refine surf to lines/tris less than size :pre

  lines are halved recursively into 2 lines
  triangles are split by longest edge, inducing split in neighbor tri
    builds tri connectivity list to do this :pre

s.delete(id1,id2,...)              delete one or more surfs
s.rename(ID,IDnew)                 rename a surf
s.copy(ID,IDnew) 	           create a new surf as copy of old surf :pre

s.select(id1,id2,...)              select one or more surfs
s.select()                         select all surfs
s.unselect(id1,id2,...)            unselect one or more surfs
@@ -132,12 +140,15 @@ s.unselect() unselect all surfs :pre
  selection applies to write() and viz()
  surfs are selected by default when read or created :pre
  
s.write("file")			   write all selected surfs to SPARTA file
s.write("file",id1,id2,...)	   write only listed & selected surfs to file :pre
s.write("file",pflag=1,nfile=0,ids=[])	    write all selected surfs to file
s.write("file",pflag=1,nfile=0,ids=[id1,id2,...])  write only listed & selected :pre

  pflag = 1/0 to include/exclude Points section, default = 1
  nfile = write SPARTA multiproc-format file to Nfile >= 1 files :pre

s.grid(xlo,xhi,ylo,yhi,ny,ny)      bounding box and Nx by Ny grid
s.grid(xlo,xhi,ylo,yhi,zlo,zhi,ny,ny,nz)   ditto for 3d
s.gridfile(xlo,xhi,ylo,yhi,file)   bbox and SPARTA-formatted parent grid file
s.gridfile(xlo,xhi,ylo,yhi,file)   bbox and SPARTA-format parent grid file
s.gridfile(xlo,xhi,ylo,yhi,zlo,zhi,file)   ditto for 3d :pre

  grid command superpose a grid, for viz only
@@ -153,7 +164,7 @@ time,box,atoms,bonds,tris,lines = s.viz(index) return list of viz objects :pre
    flag = -1 when iteration is done, 1 otherwise
  viz() returns info for selected objs for specified timestep index (must be 0)
    time = 0
    box = \[xlo,ylo,zlo,xhi,yhi,zhi\] = bounding box
    box = [xlo,ylo,zlo,xhi,yhi,zhi] = bounding box
    atoms = NULL
    bonds = NULL
    tris = id,type,x1,y1,z1,x2,y2,z2,x3,y3,z3,nx,ny,nz for each tri as 2d array
+3 −1
Changes for src/data.py: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -373,4 +373,6 @@ skeywords = [["Masses","atom types"],
             ["AngleAngleTorsion Coeffs","dihedral types"],
             ["BondBond13 Coeffs","dihedral types"],
             ["AngleAngle Coeffs","improper types"],
             ["Molecules","atoms"]]
             ["Molecules","atoms"],
             ["Tinker Types","atoms"]]
             
Loading