Beispiel #1
0
    with open(confFile,"w") as f:
        f.write(proteinString)

    # if args.mutatations:
    #     #TODO set correct filenames
    #     args = ['Scwrl4','-i',confFile,'-o','confs/test.pdb']
    #     md_tools.executeCommand(args)
    #     args = ['Scwrl4','-i','confs/test.pdb','-o',confFile,'-s',scrwl_sequence_file]
    #     md_tools.executeCommand(args)
    #     index = index+1

    md_tools.pdb2gmx(confFile,"-ff amber99sb-ildn -vsite hydrogens -water tip3p -ignh -o %s"%confFile)


    #TODO grep the last line to get charge imbalances
    boxSize= pdb_util.findPDBBoxSize(frame)
    nonProteinString = pdb_util.findAllNonProtein(frame)
    proteinString = pdb_util.findAllAminoAcidLines(confFile)

    with open(confFile,"w") as f:
        f.write(boxSize)
        f.write("\n")
        f.write(proteinString)
        f.write(nonProteinString)

membrane.injectLinesIntoTop("topol.top")
md_tools.updateMembraneCount("POPC",confFile,"topol.top",fileType="pdb")
md_tools.updateWaterAndIonCount(confFile,"topol.top")

md_tools.cleanupBackups()
Beispiel #2
0
        os.system("cp protein_mutated.pdb %s"%currentProtein)
        print "Done mutating"
        logCommand("Mutated protein using the file mutate.pml in root project dir")

    if protonationString:
        pdb2gmx(currentProtein,pdb2gmxOptions%currentProtein,protonationSelections="-asp -glu -his -arg -lys"
            ,protonationStates=protonationString)
    else:
        pdb2gmx(currentProtein,pdb2gmxOptions%currentProtein)

    #assuming that the provided files includes the whole system
    mergeProteinAndMembranePdb(currentProtein,system)
    index+=1


#only need to do this for one topology file
updateMembraneCount("POPC",currentProtein,"topol.top",fileType="pdb")
updateWaterAndIonCount(currentProtein,"topol.top")
injectLinesIntoTop("topol.top")



#TODO
#ensureCorrectSolventOrder(currentProtein,"topol.top")


os.system("mv topol.top *.itp ../")

os.system(r"rm \#* conf*.pdb.* topol.top.*")

print "Done however you need to ensure that the molecule order in the top file is correct and that your system has balanced charges"