예제 #1
0
if __name__ == '__main__':
    """ Run write function from command line.
  Input is projectDir NmrCalcRun.IDstring
  projectDir must contain the desired project (and no others)
  NmrCalcRun.IDstring is of the form 
  '%s+%s' % (NmrCalcStore.guid, Run.serial)
  """

    from memops.general import Io as genIo

    if len(sys.argv) >= 3:

        # set up input
        junk, projectDir, nmrCalcRunId = sys.argv

        if len(sys.argv) >= 4:
            targetDir = sys.argv[3]
        else:
            targetDir = None

        #intIo.prepareStdWmsRun(pluginName, projectDir, nmrCalcRunId, targetDir)

        # NB necessary.
        # As side effect prints message that passes newCalcId to WMS Java
        nmrCalcRun = intIo.getNmrCalcRun(projectDir, nmrCalcRunId, pluginName)

    else:
        #print "Usage: write projectDir NmrCalcRun.IDstring"
        print "Usage: write projectDir NmrCalcRun.IDstring targetDir(optional)"
예제 #2
0
파일: read.py 프로젝트: fenglb/ccpnmr2.4
                                        details=docTemplate % ss)

    # Make Nmr.StructureCalculation
    nmrProject = nmrCalcRun.nmrCalcStore.nmrProject
    nmrCalcRun.structureGeneration = nmrProject.newStructureGeneration(
        generationType='denovo', name='CSRosetta', structureEnsemble=ensemble)


if __name__ == '__main__':
    """ Run read function from command line.
  Input is projectDir NmrCalcRun.IDstring, Rosetta.outputdir
  projectDir must contain the desired project (and no others)
  NmrCalcRun.IDstring is of the form 
  '%s+%s' % (NmrCalcStore.guid, Run.serial)
  """

    if len(sys.argv) == 4:

        # set up input
        junk, projectDir, nmrCalcRunId, rosettaDir = sys.argv

        nmrCalcRun = intIo.getNmrCalcRun(projectDir, nmrCalcRunId)
        if nmrCalcRun is None:
            print "No NmrCalcRun found. Aborting"
        else:
            read(nmrCalcRun, rosettaDir)
            nmrCalcRun.root.saveModified()

    else:
        print "Usage: read projectDir NmrCalcRun.IDstring RosettaDataDir"