def buildGraph(whamLog, compileScript, method, basis, structures, sourceDir, graphDir, dftTime, minRC, maxRC): jobGraph = nx.DiGraph() # currentDir = getcwd() data = parseFDynamoCompileScript(compileScript) definedAtoms = data["definedAtoms"] gaussianFlexibleSele = rewriteFlexibleSeleFile( join(sourceDir, data["flexiblePart"]) ) ########## ROOT NODE ########################### rootNode = FDynamoNode(None, graphDir) rootNode.status = "finished" if not isdir(graphDir): makedirs(graphDir) rootNode.fDynamoPath = data["fDynamoPath"] rootNode.charge = data["charge"] rootNode.method = data["method"] rootNode.forceField = data["forceField"] copyfile( join(sourceDir, data["forceField"]), join(graphDir, rootNode.forceField) ) rootNode.flexiblePart = data["flexiblePart"] copyfile( join(sourceDir, data["flexiblePart"]), join(graphDir, rootNode.flexiblePart) ) rootNode.sequence = data["sequence"] copyfile( join(sourceDir, data["sequence"]), join(graphDir, rootNode.sequence) ) rootNode.qmSele = data["qmSele"] rootNode.additionalKeywords["definedAtoms"] = definedAtoms jobGraph.add_node(graphDir, data = rootNode) ########### SPLINE NODE #################### splineDir = join( graphDir, "spline" ) splineNode = SplineNode(None, splineDir, whamLog ) jobGraph.add_node( splineDir, data= splineNode ) ################## SP DFT + SP SEMIEMPIRICAL ##################################### RCstructList = [] for struct in structures: RC = rootNode.measureRC(struct) print(struct, RC) if RC < minRC or RC > maxRC: continue RCstructList.append( (RC, struct) ) RCstructList.sort() for i, rcStruct in enumerate(RCstructList): struct = rcStruct[1] dirNo = str(i) dirname = join( graphDir, dirNo ) dftDir = join(dirname, method) semiEmpDir = join(dirname, data["method"]) if not isdir(dftDir): makedirs(dftDir) if not isdir(semiEmpDir): makedirs(semiEmpDir) dftNode = FDynamoNode("DFT-SP-"+dirNo, dftDir) dftNode.verification = ["SP"] dftNode.templateKey = "QMMM_sp_gaussian" dftNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" # if structNo >= 35: # dftNode.additionalKeywords = { "method" : method, "basis" : basis , "multiplicity" : 1 , "definedAtoms" : data["definedAtoms"] , "otherOptions" : "SCF=(QC,direct,conver=6)" } # else: dftNode.additionalKeywords = { "method" : method, "basis" : basis , "multiplicity" : 1 , "definedAtoms" : data["definedAtoms"] , "otherOptions" : "SCF=(direct)" } # dftNode.additionalKeywords = { "method" : method, "basis" : basis , "multiplicity" : 1 , "definedAtoms" : data["definedAtoms"] , "otherOptions" : "SCF=direct" } dftNode.coordsIn = "coordsStart.crd" copyfile(struct, join( dftNode.path, dftNode.coordsIn )) dftNode.coordsOut = "coordsDone.crd" dftNode.flexiblePart = basename(gaussianFlexibleSele) copyfile( gaussianFlexibleSele, join(dftDir, dftNode.flexiblePart) ) dftNode.processors = 24 dftNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" dftNode.partition = "plgrid" dftNode.time = dftTime dftNode.getCoordsFromParent = False jobGraph.add_node(dftDir, data = dftNode) jobGraph.add_edge(graphDir, dftDir) semiNode = FDynamoNode("SemiEmp-SP-"+dirNo, semiEmpDir) semiNode.verification = ["SP"] semiNode.templateKey = "QMMM_sp" semiNode.coordsIn = "coordsStart.crd" semiNode.coordsOut = "coordsDone.crd" copyfile(struct, join( semiNode.path, semiNode.coordsIn )) semiNode.partition = "plgrid-short" semiNode.time = "0:10:00" semiNode.getCoordsFromParent = False jobGraph.add_node(semiEmpDir, data = semiNode) jobGraph.add_edge( graphDir, semiEmpDir ) splineDiff = SplineDiffNode("diff", dirname) jobGraph.add_node(dirname, data = splineDiff) jobGraph.add_edge( dftDir, dirname ) jobGraph.add_edge( semiEmpDir, dirname ) jobGraph.add_edge( dirname, splineDir ) return jobGraph
def addTSsearch(jobGraph, rootDir, currentDir, baseData, initialGeom, index, method, basis, gaussianFelxSele): newNode = FDynamoNode("tsSearch.f90", currentDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 1 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = {"ts_search": "true"} newNode.coordsIn = "coordsIn.crd" gaussianTime = "72:00:00" if not isdir(currentDir): makedirs(currentDir) saveCrdFromDCD(join(currentDir, "coordsIn.crd"), initialGeom) newNode.coordsOut = "coordsDone.crd" newNode.getCoordsFromParent = False newNode.fDynamoPath = baseData["fDynamoPath"] newNode.charge = baseData["charge"] newNode.method = baseData["method"] newNode.forceField = data["forceField"] copyfile(join(baseData["filesDir"], baseData["forceField"]), join(currentDir, newNode.forceField)) newNode.flexiblePart = data["flexiblePart"] copyfile(join(baseData["filesDir"], baseData["flexiblePart"]), join(currentDir, newNode.flexiblePart)) newNode.sequence = data["sequence"] copyfile(join(baseData["filesDir"], baseData["sequence"]), join(currentDir, newNode.sequence)) newNode.qmSele = data["qmSele"] jobGraph.add_node(currentDir, data=newNode) jobGraph.add_edge(rootDir, currentDir) am1Dir = currentDir ######################################################## currentDir = join(currentDir, "ts_gaussian") if not isdir(currentDir): makedirs(currentDir) newNode = FDynamoNode("tsSearch", currentDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 1 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "true", "method": method, "basis": basis, "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" newNode.flexiblePart = basename(gaussianFelxSele) copyfile(gaussianFelxSele, join(currentDir, newNode.flexiblePart)) newNode.processors = 24 newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" newNode.partition = "plgrid" newNode.time = gaussianTime jobGraph.add_node(currentDir, data=newNode) jobGraph.add_edge(am1Dir, currentDir) ######################################################## newDir = join(am1Dir, "irc_reverse") newNode = FDynamoNode("irc_reverse.f90", newDir) newNode.verification = ["SP"] newNode.templateKey = "QMMM_irc_mopac" newNode.additionalKeywords = {"IRC_dir": "-1"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" jobGraph.add_node(newDir, data=newNode) jobGraph.add_edge(am1Dir, newDir) ######################################################## optDir = join(newDir, "opt") newNode = FDynamoNode("opt.f90", optDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = { "ts_search": "false", "definedAtoms": baseData["definedAtoms"] } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone" + str(index) + ".crd" newNode.measureRCinOutput = True jobGraph.add_node(optDir, data=newNode) jobGraph.add_edge(newDir, optDir) ######################################################## optDirGaussian = join(newDir, "optGaussian") if not isdir(optDirGaussian): makedirs(optDirGaussian) newNode = FDynamoNode("opt.f90", optDirGaussian) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "false", "definedAtoms": baseData["definedAtoms"], "method": method, "basis": basis, "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone" + str(index) + ".crd" newNode.flexiblePart = basename(gaussianFelxSele) copyfile(gaussianFelxSele, join(optDirGaussian, newNode.flexiblePart)) newNode.measureRCinOutput = True newNode.processors = 24 newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" newNode.partition = "plgrid" newNode.time = gaussianTime jobGraph.add_node(optDirGaussian, data=newNode) jobGraph.add_edge(optDir, optDirGaussian) ######################################################## newDir = join(am1Dir, "irc_forward") newNode = FDynamoNode("irc_forward.f90", newDir) newNode.verification = ["SP"] newNode.templateKey = "QMMM_irc_mopac" newNode.additionalKeywords = {"IRC_dir": "1"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" jobGraph.add_node(newDir, data=newNode) jobGraph.add_edge(am1Dir, newDir) ######################################################## optDir = join(newDir, "opt") newNode = FDynamoNode("opt.f90", optDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = { "ts_search": "false", "definedAtoms": baseData["definedAtoms"] } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone" + str(index) + ".crd" newNode.measureRCinOutput = True jobGraph.add_node(optDir, data=newNode) jobGraph.add_edge(newDir, optDir) ######################################################## optDirGaussian = join(optDir, "optGaussian") if not isdir(optDirGaussian): makedirs(optDirGaussian) newNode = FDynamoNode("opt.f90", optDirGaussian) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "false", "definedAtoms": baseData["definedAtoms"], "method": method, "basis": basis, "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone" + str(index) + ".crd" newNode.measureRCinOutput = True newNode.processors = 24 newNode.flexiblePart = basename(gaussianFelxSele) copyfile(gaussianFelxSele, join(optDirGaussian, newNode.flexiblePart)) newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" newNode.partition = "plgrid" newNode.time = gaussianTime jobGraph.add_node(optDirGaussian, data=newNode) jobGraph.add_edge(optDir, optDirGaussian)
def generateTSsearchDynamoPMF(compFile, onlyPrepare, onlyRun, runDFT): jobGraph = nx.DiGraph() currentDir = getcwd() rootDir = currentDir data = parseFDynamoCompileScript(compFile) ########## INITIAL SCAN ########################### definedAtoms = data["definedAtoms"] constraints = data["constraints"] newNode = FDynamoNode(data["inputFile"], currentDir) newNode.coordsIn = data["coordsIn"] newNode.verification = ["scan1D"] newNode.slurmFile = None newNode.autorestart = False newNode.readInitialScanCoord = True # newNode.noOfExcpectedImaginaryFrequetions = 1 newNode.forceField = data["forceField"] newNode.flexiblePart = data["flexiblePart"] newNode.sequence = data["sequence"] newNode.qmSele = data["qmSele"] newNode.templateKey = "QMMM_scan1D_mopac" newNode.fDynamoPath = data["fDynamoPath"] newNode.charge = data["charge"] newNode.method = data["method"] newNode.additionalKeywords = { "scanDir": "+", "coordScanStart": "", "iterNo": "80", "definedAtoms": definedAtoms, "constraints": constraints } if not onlyRun: jobGraph.add_node(currentDir, data=newNode) newNode.generateInput() # newNode.compileInput() ################## TS SEARCH ##################################### startDir, currentDir = currentDir, join(currentDir, "ts_search") newNode = FDynamoNode("tsSearch.f90", currentDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 1 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = {"ts_search": "true"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" if not onlyRun: jobGraph.add_node(currentDir, data=newNode) jobGraph.add_edge(startDir, currentDir) tsFoundDir = currentDir if runDFT: gaussianFlexibleSele = rewriteFlexibleSeleFile( join(rootDir, data["flexiblePart"])) tsGaussianDir = join(tsFoundDir, "b3lyp") if not isdir(tsGaussianDir): makedirs(tsGaussianDir) newNode = FDynamoNode("tsSearch", tsGaussianDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 1 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "true", "method": "B3LYP", "basis": "6-31G(d,p)", "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" newNode.flexiblePart = basename(gaussianFlexibleSele) newNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" copyfile(gaussianFlexibleSele, join(tsGaussianDir, newNode.flexiblePart)) newNode.processors = 24 newNode.time = "30:00:00" newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(tsGaussianDir, data=newNode) jobGraph.add_edge(tsFoundDir, tsGaussianDir) spDir = join(tsGaussianDir, "SP") dftNode = FDynamoNode("DFT-SP-", spDir) dftNode.verification = ["SP"] dftNode.templateKey = "QMMM_sp_gaussian" dftNode.additionalKeywords = { "method": "B3LYP", "basis": "6-311++G(2d,2p)", "multiplicity": 1, "otherOptions": "" } dftNode.coordsIn = "coordsStart.crd" dftNode.coordsOut = "coordsDone.crd" dftNode.flexiblePart = basename(gaussianFlexibleSele) dftNode.processors = 24 dftNode.time = "30:00:00" dftNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" dftNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(spDir, data=dftNode) jobGraph.add_edge(tsGaussianDir, spDir) newDir = join(currentDir, "irc_reverse") newNode = FDynamoNode("irc_reverse.f90", newDir) newNode.verification = ["SP"] newNode.templateKey = "QMMM_irc_mopac" newNode.additionalKeywords = {"IRC_dir": "-1"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" if not onlyRun: jobGraph.add_node(newDir, data=newNode) jobGraph.add_edge(currentDir, newDir) optDir = join(newDir, "opt") newNode = FDynamoNode("opt.f90", optDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = {"ts_search": "false"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" if not onlyRun: jobGraph.add_node(optDir, data=newNode) jobGraph.add_edge(newDir, optDir) if runDFT: tsGaussianDir = join(optDir, "b3lyp") if not isdir(tsGaussianDir): makedirs(tsGaussianDir) newNode = FDynamoNode("opt", tsGaussianDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "false", "method": "B3LYP", "basis": "6-31G(d,p)", "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" newNode.flexiblePart = basename(gaussianFlexibleSele) copyfile(gaussianFlexibleSele, join(tsGaussianDir, newNode.flexiblePart)) newNode.processors = 24 newNode.time = "30:00:00" newNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(tsGaussianDir, data=newNode) jobGraph.add_edge(optDir, tsGaussianDir) spDir = join(tsGaussianDir, "SP") dftNode = FDynamoNode("DFT-SP-", spDir) dftNode.verification = ["SP"] dftNode.templateKey = "QMMM_sp_gaussian" dftNode.additionalKeywords = { "method": "B3LYP", "basis": "6-311++G(2d,2p)", "multiplicity": 1, "otherOptions": "" } dftNode.coordsIn = "coordsStart.crd" dftNode.coordsOut = "coordsDone.crd" dftNode.flexiblePart = basename(gaussianFlexibleSele) dftNode.processors = 24 dftNode.time = "30:00:00" dftNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" dftNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(spDir, data=dftNode) jobGraph.add_edge(tsGaussianDir, spDir) newDir = join(currentDir, "irc_forward") newNode = FDynamoNode("irc_forward.f90", newDir) newNode.verification = ["SP"] newNode.templateKey = "QMMM_irc_mopac" newNode.additionalKeywords = {"IRC_dir": "1"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" if not onlyRun: jobGraph.add_node(newDir, data=newNode) jobGraph.add_edge(currentDir, newDir) optDir = join(newDir, "opt") newNode = FDynamoNode("opt.f90", optDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_mopac" newNode.additionalKeywords = {"ts_search": "false"} newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" if not onlyRun: jobGraph.add_node(optDir, data=newNode) jobGraph.add_edge(newDir, optDir) if runDFT: tsGaussianDir = join(optDir, "b3lyp") if not isdir(tsGaussianDir): makedirs(tsGaussianDir) newNode = FDynamoNode("opt", tsGaussianDir) newNode.verification = ["Opt", "Freq"] newNode.noOfExcpectedImaginaryFrequetions = 0 newNode.templateKey = "QMMM_opt_gaussian" newNode.fDynamoPath = "/net/people/plgglanow/fortranPackages/AMBER-g09/AMBER-dynamo/makefile" newNode.additionalKeywords = { "ts_search": "false", "method": "B3LYP", "basis": "6-31G(d,p)", "multiplicity": 1, "otherOptions": "" } newNode.coordsIn = "coordsStart.crd" newNode.coordsOut = "coordsDone.crd" newNode.flexiblePart = basename(gaussianFlexibleSele) copyfile(gaussianFlexibleSele, join(tsGaussianDir, newNode.flexiblePart)) newNode.processors = 24 newNode.time = "30:00:00" newNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" newNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(tsGaussianDir, data=newNode) jobGraph.add_edge(optDir, tsGaussianDir) spDir = join(tsGaussianDir, "SP") dftNode = FDynamoNode("DFT-SP-", spDir) dftNode.verification = ["SP"] dftNode.templateKey = "QMMM_sp_gaussian" dftNode.additionalKeywords = { "method": "B3LYP", "basis": "6-311++G(2d,2p)", "multiplicity": 1, "otherOptions": "" } dftNode.coordsIn = "coordsStart.crd" dftNode.coordsOut = "coordsDone.crd" dftNode.flexiblePart = basename(gaussianFlexibleSele) dftNode.processors = 24 dftNode.time = "30:00:00" dftNode.partition = "plgrid-gpu\n#SBATCH --gres=gpu:1\n#SBATCH -A plgksdhphdgpu" dftNode.moduleAddLines = "module add plgrid/apps/gaussian/g16.B.01" jobGraph.add_node(spDir, data=dftNode) jobGraph.add_edge(tsGaussianDir, spDir) ####################### SCAN FROM TS ######################### scanSteps = 40 reverseScan = join(startDir, "TS1reverseScan") newNode = FDynamoNode("scan.f90", reverseScan) newNode.verification = ["SP"] newNode.templateKey = "QMMM_scan1D_mopac" newNode.readInitialScanCoord = True newNode.additionalKeywords = { "scanDir": "-", "coordScanStart": "", "iterNo": str(scanSteps), "definedAtoms": definedAtoms, "constraints": constraints } newNode.coordsIn = "coordsStart.crd" jobGraph.add_node(reverseScan, data=newNode) if onlyRun: newNode.forceField = data["forceField"] newNode.flexiblePart = data["flexiblePart"] newNode.sequence = data["sequence"] newNode.qmSele = data["qmSele"] newNode.templateKey = "QMMM_scan1D_mopac" newNode.fDynamoPath = data["fDynamoPath"] newNode.charge = data["charge"] newNode.method = data["method"] newNode.status = "examined" else: jobGraph.add_edge(tsFoundDir, reverseScan) if not onlyPrepare: pmfDir = join(startDir, "PMF") for i in range(scanSteps + 1): stepDir = join(pmfDir, "pmfRev" + str(i)) newNode = FDynamoNode("pmfStep.f90", stepDir) newNode.verification = ["SP"] newNode.partition = "plgrid" newNode.time = "72:00:00" newNode.templateKey = "QMMM_pmf" newNode.readInitialScanCoord = True newNode.additionalKeywords = { "coordScanStart": "", "definedAtoms": definedAtoms, "constraints": constraints } newNode.coordsIn = "seed.-" + str(i) newNode.anotherCoordsSource = "seed.-" + str(i) jobGraph.add_node(stepDir, data=newNode) jobGraph.add_edge(reverseScan, stepDir) forwardScan = join(startDir, "TS1forwardScan") newNode = FDynamoNode("scan.f90", forwardScan) newNode.verification = ["SP"] newNode.templateKey = "QMMM_scan1D_mopac" newNode.readInitialScanCoord = True newNode.additionalKeywords = { "scanDir": "+", "coordScanStart": "", "iterNo": str(scanSteps), "definedAtoms": definedAtoms, "constraints": constraints } newNode.coordsIn = "coordsStart.crd" jobGraph.add_node(forwardScan, data=newNode) if onlyRun: newNode.forceField = data["forceField"] newNode.flexiblePart = data["flexiblePart"] newNode.sequence = data["sequence"] newNode.qmSele = data["qmSele"] newNode.templateKey = "QMMM_scan1D_mopac" newNode.fDynamoPath = data["fDynamoPath"] newNode.charge = data["charge"] newNode.method = data["method"] newNode.status = "examined" else: jobGraph.add_edge(tsFoundDir, forwardScan) if not onlyPrepare: for i in range(1, scanSteps + 1): stepDir = join(pmfDir, "pmfForw" + str(i)) newNode = FDynamoNode("pmfStep.f90", stepDir) newNode.verification = ["SP"] newNode.partition = "plgrid" newNode.time = "72:00:00" newNode.templateKey = "QMMM_pmf" newNode.readInitialScanCoord = True newNode.anotherCoordsSource = "seed.+" + str(i) newNode.additionalKeywords = { "coordScanStart": "", "definedAtoms": definedAtoms, "constraints": constraints } newNode.coordsIn = "seed.+" + str(i) jobGraph.add_node(stepDir, data=newNode) jobGraph.add_edge(forwardScan, stepDir) return jobGraph