get rid of (evil) tabs and trailing whitespace in bundled Pizza.py components

This commit is contained in:
Axel Kohlmeyer
2019-09-19 07:34:27 -04:00
parent df3fad3b49
commit c26c8aca4f
6 changed files with 197 additions and 197 deletions

View File

@ -3,7 +3,7 @@
#
# Copyright (2005) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
# certain rights in this software. This software is distributed under
# certain rights in this software. This software is distributed under
# the GNU General Public License.
# xyz tool
@ -11,14 +11,14 @@
oneline = "Convert LAMMPS snapshots to XYZ format"
docstr = """
x = xyz(d) d = object containing atom coords (dump, data)
x = xyz(d) d = object containing atom coords (dump, data)
x.one() write all snapshots to tmp.xyz
x.one("new") write all snapshots to new.xyz
x.many() write snapshots to tmp0000.xyz, tmp0001.xyz, etc
x.many("new") write snapshots to new0000.xyz, new0001.xyz, etc
x.single(N) write snapshot for timestep N to tmp.xyz
x.single(N,"file") write snapshot for timestep N to file.xyz
x.single(N) write snapshot for timestep N to tmp.xyz
x.single(N,"file") write snapshot for timestep N to file.xyz
"""
# History
@ -41,7 +41,7 @@ class xyz:
def __init__(self,data):
self.data = data
# --------------------------------------------------------------------
def one(self,*args):
@ -61,14 +61,14 @@ class xyz:
for atom in atoms:
itype = int(atom[1])
print >>f,itype,atom[2],atom[3],atom[4]
print time,
sys.stdout.flush()
n += 1
f.close()
print "\nwrote %d snapshots to %s in XYZ format" % (n,file)
# --------------------------------------------------------------------
def many(self,*args):
@ -80,7 +80,7 @@ class xyz:
which,time,flag = self.data.iterator(flag)
if flag == -1: break
time,box,atoms,bonds,tris,lines = self.data.viz(which)
if n < 10:
file = root + "000" + str(n)
elif n < 100:
@ -88,7 +88,7 @@ class xyz:
elif n < 1000:
file = root + "0" + str(n)
else:
file = root + str(n)
file = root + str(n)
file += ".xyz"
f = open(file,"w")
print >>f,len(atoms)
@ -100,9 +100,9 @@ class xyz:
sys.stdout.flush()
f.close()
n += 1
print "\nwrote %s snapshots in XYZ format" % n
# --------------------------------------------------------------------
def single(self,time,*args):