("PRTA", "GLU", 14), ("PRTA", "ARG", 15), ) mcModelGMCT = MCModelGMCT (pathGMCT="/home/mikolaj/local/bin/") mcModelDefault = MCModelDefault () for mcModel, folded, direc, message, sedFile, substateFile in ( (None , True , "curves_analytic" , "analytically" , "prob_ph7_analytic.sed" , "substate_ph7_analytic.tex" ), (mcModelGMCT , True , "curves_gmct" , "using GMCT" , "prob_ph7_gmct.sed" , "substate_ph7_gmct.tex" ), (mcModelDefault , True , "curves_custom" , "using custom MC sampling" , "prob_ph7_custom.sed" , "substate_ph7_custom.tex" ), ): electrostaticModel.DefineMCModel (mcModel) logFile.Text ("\n***Calculating titration curves %s***\n" % message) curves = TitrationCurves (electrostaticModel, curveSampling=.5) curves.CalculateCurves () curves.WriteCurves (directory=direc) logFile.Text ("\n***Calculating protonation states at pH=7 %s***\n" % message) electrostaticModel.CalculateProbabilities (pH=7.) electrostaticModel.SummaryProbabilities () electrostaticModel.SedScript_FromProbabilities (filename=sedFile, overwrite=True) logFile.Text ("\n***Calculating substate energies at pH=7 %s***\n" % message) substate = MEADSubstate (electrostaticModel, sites) substate.CalculateSubstateEnergies () substate.Summary () substate.Summary_ToLatex (filename=substateFile, includeSegment=True) logFile.Text ("\n***Calculating energies of the first 10 state vectors***\n")
increment = statevector.Increment() logFile.Text( "\n*** Calculating protonation probabilities at pH=7 analytically ***\n") cem.CalculateProbabilities(pH=7.0) cem.SummaryProbabilities() logFile.Text( "\n*** Calculating protonation probabilities at pH=7 using in-house MC sampling ***\n" ) mc = MCModelDefault(nprod=30000) cem.DefineMCModel(mc) cem.CalculateProbabilities() cem.SummaryProbabilities() # =========================================== logFile.Text("\n*** Calculating titration curves analytically ***\n") cmc = TitrationCurves(cem, curveSampling=0.5) cmc.CalculateCurves() cmc.WriteCurves(directory="curves_analytic") logFile.Text( "\n*** Calculating titration curves using in-house MC sampling ***\n") cem.DefineMCModel(None) ca = TitrationCurves(cem, curveSampling=0.5) ca.CalculateCurves() ca.WriteCurves(directory="curves_mc") # =========================================== logFile.Footer()
mol = CHARMMPSFFile_ToSystem( "setup/ifp20_xplor_separated.psf", isXPLOR=True, parameters=CHARMMParameterFiles_ToParameters(parameters)) mol.coordinates3 = CHARMMCRDFile_ToCoordinates3("setup/ifp20.crd") mol.Summary() mead = MEADModel(system=mol, pathMEAD="/home/mikolaj/local/bin/", pathScratch="mead", nthreads=1) mead.Initialize(excludeResidues=(("PRTA", "CYS", 24), )) mead.Summary() mead.WriteJobFiles() mead.CalculateElectrostaticEnergies(calculateETA=False) sampling = MCModelDefault() mead.DefineMCModel(sampling) tc = TitrationCurves(mead) tc.CalculateCurves() tc.WriteCurves(directory="curves") selection = (("PRTA", "HIS", 260), ("CHRO", "BLF", 1), ("CHRO", "ACB", 2), ("CHRO", "ACC", 3)) substate = MEADSubstate(mead, selection, pH=7.0) substate.CalculateSubstateEnergies() substate.Summary()
("PRTA", "CYS", 80), ("PRTA", "CYS", 76), ("PRTA", "CYS", 94), ("PRTA", "ARG", 0), ) cem.Initialize(excludeResidues=exclusions, includeTermini=True) cem.Summary() cem.SummarySites() cem.WriteJobFiles() cem.CalculateElectrostaticEnergies(calculateETA=False) cem.CalculateProbabilities(pH=7.0) cem.SummaryProbabilities() curves = TitrationCurves(cem) curves.CalculateCurves() curves.WriteCurves(directory="curves_analytic") curves.PrintHalfpKs(decimalPlaces=1) sampling = MCModelDefault() cem.DefineMCModel(sampling) cem.CalculateProbabilities(pH=7.0) cem.SummaryProbabilities() mcc = TitrationCurves(cem) mcc.CalculateCurves() mcc.WriteCurves(directory="curves_mc") mcc.PrintHalfpKs(decimalPlaces=1)