def runTravelDepthCompletely(
    pdbFileName, gridSize=1.0, whichSrf="mesh", probeSize=False,
    radScaleIn=False, pathToExecs="$TDHOME/bin/", deleteFiles=True,
    check2trisPerEdge=True, doTravelDepth=True, gridSizeIncrement=0.2,
    doIncrement=True, incrementMax=20):
  pathToExecs = os.path.expandvars(pathToExecs)
  rootNameTemp = string.replace(pdbFileName, ".pdb", "")
  rootName = string.replace(rootNameTemp, ".PDB", "")
  #now there are 4 more files
  print "running the tst creation code"
  gridSizeTry = float(gridSize)
  triesLeft = incrementMax
  if not doIncrement:
    triesLeft = 1  # only do one try
  while triesLeft >= 1:
    okay = makeTstDoChecks(
        pdbFileName, gridSizeTry, pathToExecs, rootName, whichSrf, probeSize,
        radScaleIn, check2trisPerEdge=check2trisPerEdge)
    if not okay:
      triesLeft -= 1
      gridSizeTry += float(gridSizeIncrement)
      print "changing grid size to", gridSizeTry, "and trying again."
    else:  # everything was okay
      print "that run worked, proceeding"
      break
  if okay:
    tstFileName = rootName + ".tst"
    print "repairing nearby points if necessary"
    tstTravelDist.repairPointPdbRecord(tstD=None, tstFileName=tstFileName)
    phiFileName = rootName + ".phi"
    tstCavFileName = rootName + ".cav.tst"
    phiCavFileName = rootName + ".cav.phi"
    nocavTstFileName = rootName + ".nocav.tst"
    nocavPhiFileName = rootName + ".nocav.phi"
    print "removing cavities"
    cavity.tstCavityRemoval(
        tstFileName, nocavTstFileName, phiFileName, nocavPhiFileName)
    #now no more cavities
    print "running convex hull"
    tstConvexHull.tstConvexHull(
        pathToExecs + khullExec, nocavTstFileName, pathToExecs + qhullExec)
    convexTempFile1 = nocavTstFileName + ".tempQHullFile.output"
    convexTempFile2 = nocavTstFileName + ".tempQHullFile"
    #now has convex hull data,next step is travel depth
    if doTravelDepth:  # sometimes just skip for pockets, etc
      print "running travel depth"
      oldTravelDist.tstTravelDepth(nocavTstFileName, nocavPhiFileName)
    #now has travel depth data in it
    print "renaming files, deleting temporary files"
    os.rename(tstFileName, tstCavFileName)  # keep the cavities
    os.rename(phiFileName, phiCavFileName)
    if deleteFiles:  # delete unnecessary debugging files...
      os.unlink(convexTempFile1)
      os.unlink(convexTempFile2)
      os.unlink(rootName + ".tri")
  return nocavTstFileName
 elif sys.argv[1] == "findholes" and len(sys.argv) > 3:
   tstFile, phiFile = sys.argv[2:4]
   print tstFile, phiFile
   tstTravelFindHoles(tstFile, phiFile, debugOut=False)
 elif sys.argv[1] == "findholesdebug" and len(sys.argv) > 3:
   tstFile, phiFile = sys.argv[2:4]
   print tstFile, phiFile
   tstTravelFindHoles(tstFile, phiFile, debugOut=True)
 elif sys.argv[1] == "meshsurfin" and len(sys.argv) > 3:
   tstFile, phiFile = sys.argv[2:4]
   print tstFile, phiFile
   tstTravelSurfInsideMesh(tstFile, phiFile)
 elif sys.argv[1] == "cavityremove" and len(sys.argv) > 3:
   tstFile, tstOut, phiFile, phiOut = sys.argv[2:6]
   print tstFile, tstOut, phiFile, phiOut
   cavity.tstCavityRemoval(tstFile, tstOut, phiFile, phiOut)
 elif sys.argv[1] == "countholes" and len(sys.argv) > 2:
   tstFileIn = sys.argv[2]
   print tstFileIn,
   print tstCountHoles(tstFileIn)
 elif sys.argv[1] == "assigncharge" and len(sys.argv) > 2:
   tstFile = sys.argv[2]
   print tstFile,
   if len(sys.argv) > 3:
     chargeFile = sys.argv[3]
     print chargeFile
     chargeD = charge.charge(chargeFile)
   else:
     chargeD = charge.charge()
   tstAssignCharges(tstFile, chargeD)
 elif sys.argv[1] == "pocketmap" and len(sys.argv) > 3: