ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/utilities/dumpConverter
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/utilities/dumpConverter (file contents):
Revision 2966 by tim, Thu Jul 27 20:36:54 2006 UTC vs.
Revision 2967 by chrisfen, Thu Jul 27 21:02:54 2006 UTC

# Line 19 | Line 19 | __version__ = "$Revision: 1.2 $"
19   """
20  
21   __author__ = "Dan Gezelter (gezelter@nd.edu)"
22 < __version__ = "$Revision: 1.2 $"
23 < __date__ = "$Date: 2006-07-27 20:36:54 $"
22 > __version__ = "$Revision: 1.3 $"
23 > __date__ = "$Date: 2006-07-27 21:02:54 $"
24   __copyright__ = "Copyright (c) 2006 by the University of Notre Dame"
25   __license__ = "OOPSE"
26  
# Line 104 | Line 104 | def convertFiles(mdFileName, configFileName, outputFil
104              vy = float(L[5])
105              vz = float(L[6])
106              sdFormat = 'pv'
107 <            if (len(L) == 14):
107 >            if (len(L) == 10):
108 >                sdFormat = 'pvf'
109 >                fx = float(L[7])
110 >                fy = float(L[8])
111 >                fz = float(L[9])
112 >            if (len(L) >= 14):
113                  qw = float(L[7])
114                  qx = float(L[8])
115                  qy = float(L[9])
# Line 123 | Line 128 | def convertFiles(mdFileName, configFileName, outputFil
128                  tx = float(L[17])
129                  ty = float(L[18])
130                  tz = float(L[19])
131 <                sdFormat = 'pvqjft'
131 >                if (qw == 0.0 and qx == 0.0 and qy == 0.0 and qz == 0.0):
132 >                    sdFormat = 'pvf'
133 >                else:
134 >                    sdFormat = 'pvqjft'
135              if (sdFormat == 'pv'):
136                  outputFile.write("%d\t%s\t%18.10g\t%18.10g\t%18.10g\t%14.10g\t%14.10g\t%14.10g\n" % (whichSD-1, sdFormat, x, y, z, vx, vy, vz))
137 +            elif (sdFormat == 'pvf'):
138 +                outputFile.write("%d\t%s\t%18.10g\t%18.10g\t%18.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\n" % (whichSD-1, sdFormat, x, y, z, vx, vy, vz, fx, fy, fz))
139              elif (sdFormat == 'pvqj'):
140                  outputFile.write("%d\t%s\t%18.10g\t%18.10g\t%18.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\t%14.10g\n" % (whichSD-1, sdFormat, x, y, z, vx, vy, vz, qw, qx, qy, qz, jx, jy, jz))
141              elif (sdFormat == 'pvqjft'):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines