Package nMOLDYN :: Package Tests :: Package ARA :: Module runTests |
[hide private]
[frames] | no frames]

# Source Code for Module nMOLDYN.Tests.ARA.runTests

     1  import os
     2  import sys
     3  sys.path.insert(0, '/home/cs/pellegrini/nMOLDYN/development')
     4  from nMOLDYN.Core.IOFiles import convertASCIIToNetCDF
     5
     6  pMoldyn='/home/cs/pellegrini/nMOLDYN/nMOLDYN2.2.5/nMoldyn/bin/pMoldyn'
     7
     8  if len(sys.argv) > 1:
     9      selectedTests = [int(v) for v in sys.argv[1:]]
    10  else:
    11      selectedTests = range(1,15)
    12
    13  a = 'ARA'
    14
    15  for i in selectedTests:
    16      print "Run test ", i
    17      if i <= 7:
    18          os.system(pMoldyn + ' --ar-vel --input=%s%s_Reference.inp' % (a,i))
    19      else:
    20          os.system(pMoldyn + ' --ar-xyz --input=%s%s_Reference.inp' % (a,i))
    21
    22      os.system('mv testDOS.plot DOS%s_Reference.plot' % i)
    23      os.system('mv testMSD.plot MSD%s_Reference.plot' % i)
    24      os.system('mv testVACF.plot VACF%s_Reference.plot' % i)
    25      os.system('mv testPARAMETERS.plot PARAMETERS%s_Reference.plot' % i)
    26      os.system('mv testMEMORY.plot MEMORY%s_Reference.plot' % i)
    27      convertASCIIToNetCDF('DOS%s_Reference.plot' % i, 'DOS%s_Reference.nc' % i)
    28      convertASCIIToNetCDF('MSD%s_Reference.plot' % i, 'MSD%s_Reference.nc' % i)
    29      convertASCIIToNetCDF('VACF%s_Reference.plot' % i, 'VACF%s_Reference.nc' % i)
    30      convertASCIIToNetCDF('MEMORY%s_Reference.plot' % i, 'MEMORY%s_Reference.nc' % i)
    31