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

Comparing trunk/OOPSE-4/src/applications/utilities/md2md (file contents):
Revision 3392 by gezelter, Wed Feb 13 16:44:14 2008 UTC vs.
Revision 3393 by xsun, Wed May 14 20:49:17 2008 UTC

# Line 22 | Line 22 | __version__ = "$Revision: 1.1 $"
22   """
23  
24   __author__ = "Dan Gezelter (gezelter@nd.edu)"
25 < __version__ = "$Revision: 1.1 $"
26 < __date__ = "$Date: 2008-02-13 16:44:14 $"
25 > __version__ = "$Revision: 1.2 $"
26 > __date__ = "$Date: 2008-05-14 20:49:17 $"
27   __copyright__ = "Copyright (c) 2008 by the University of Notre Dame"
28   __license__ = "OOPSE"
29  
# Line 188 | Line 188 | def writeFile(outputFileName):
188      outputFile.write("    <StuntDoubles>\n")
189      whichSD = 0
190  
191 +    print repeatX, repeatY, repeatZ
192 +
193      for i in range(len(indices)):
194          for ii in range(repeatX):
195              for jj in range(repeatY):
196                  for kk in range(repeatZ):
197 <                    
198 <                    myP = p[i] + ii*Hmat[0] + jj*Hmat[1] + kk*Hmat[2]
197 >                  
198 >                    myP = []
199 >                    myP.append(p[i][0] + ii*Hmat[0][0] + jj*Hmat[1][0] + kk*Hmat[2][0])
200 >                    myP.append(p[i][1] + ii*Hmat[0][1] + jj*Hmat[1][1] + kk*Hmat[2][1])
201 >                    myP.append(p[i][2] + ii*Hmat[0][2] + jj*Hmat[1][2] + kk*Hmat[2][2])
202  
203                      if (pvqj[i] == 'pv'):
204                          outputFile.write("%10d %7s %18.10g %18.10g %18.10g %14e %13e %13e\n" % (whichSD, pvqj[i], myP[0], myP[1], myP[2], v[i][0], v[i][1], v[i][2]))
205 <                    elif (sdFormat == 'pvqj'):
205 >                    elif (pvqj[i] == 'pvqj'):
206                          outputFile.write("%10d %7s %18.10g %18.10g %18.10g %13e %13e %13e %13e %13e %13e %13e %13e %13e %13e\n" % (whichSD, pvqj[i], myP[0], myP[1], myP[2], v[i][0], v[i][1], v[i][2], q[i][0], q[i][1], q[i][2], q[i][3], j[i][0], j[i][1], j[i][2]))
207                          
208                      whichSD = whichSD + 1
# Line 267 | Line 272 | def main(argv):
272              outputFileName = arg
273              global _haveOutputFileName
274              _haveOutputFileName = 1
275 <        elif opt in ("-x", "--repeatX"):
275 >        elif opt in ("-x", "--repeatX"):
276 >            global repeatX
277              repeatX = int(arg)
278          elif opt in ("-y", "--repeatY"):
279 +            global repeatY
280              repeatY = int(arg)
281          elif opt in ("-z", "--repeatZ"):
282 +            global repeatZ
283              repeatZ = int(arg)
284      if (_haveMDFileName != 1):
285          usage()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines