Exemple #1
0
sites = (
    ("PRTA", "ASP" , 2),
    ("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)
Exemple #2
0
    isXPLOR=True,
    parameters=CHARMMParameterFiles_ToParameters(parameters),
)
mol.coordinates3 = CHARMMCRDFile_ToCoordinates3("charmm/testpeptide.crd")

cem = MEADModel(system=mol,
                pathMEAD="/home/mikolaj/local/bin/",
                pathScratch="mead",
                nthreads=1)
cem.Initialize()
cem.Summary()
cem.SummarySites()
cem.WriteJobFiles()
cem.CalculateElectrostaticEnergies()

logFile.Text(
    "\n*** Calculating microstate energies of all states at pH=7 ***\n")

statevector = StateVector(cem)
increment = True
while increment:
    Gmicro = cem.CalculateMicrostateEnergy(statevector, pH=7.0)
    statevector.Print(title="Gmicro = %f" % Gmicro)
    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"
Exemple #3
0
        "setup/7LYZ/lysozyme1977.crd",
        "mead/7LYZ",
        "curves/7LYZ",
        "Old lysozyme",
    ),
    (
        "new",
        "setup/2LZT/lysozyme1990_xplor.psf",
        "setup/2LZT/lysozyme1990.crd",
        "mead/2LZT",
        "curves/2LZT",
        "New lysozyme",
    ),
):

    logFile.Text("\n*** Now calculating: %s ***\n" % message)

    protein = CHARMMPSFFile_ToSystem(
        proteinPsf,
        isXPLOR=True,
        parameters=CHARMMParameterFiles_ToParameters(parameters),
    )
    protein.coordinates3 = CHARMMCRDFile_ToCoordinates3(proteinCrd)

    model = MEADModel(
        system=protein,
        pathMEAD="/home/mikolaj/local/bin/",
        pathScratch=meadDir,
        nthreads=1,
    )
    model.Initialize(excludeResidues=exclusions, includeTermini=True)
    "par_all27_prot_na.inp",
    "par.inp",
)

mol = CHARMMPSFFile_ToSystem(
    "parent_waterbox.psf",
    isXPLOR=True,
    parameters=CHARMMParameterFiles_ToParameters(parameters))
mol.coordinates3 = XYZFile_ToCoordinates3("geometry.xyz")
mol.Summary()

trajectory = XTCTrajectoryFileReader("heat.xtc", mol)
trajectory.Summary()

while trajectory.RestoreOwnerData():
    logFile.Text("Frame count: %d\n" % trajectory.currentFrame)
    XYZFile_FromSystem("sav%03d.xyz" % trajectory.currentFrame, mol)

trajectory.Summary()

#===========================================================
# This part takes a bit more time to execute, uncomment if you like
# direc = "traj"
#
# if not os.path.exists (direc):
#     os.makedirs (direc)
#
# XTCTrajectory_ToSystemGeometryTrajectory ("heat.xtc", direc, mol)

#===========================================================
logFile.Footer()