Source code for schrodinger.application.watermap.watermap_scoring
# Contributors: Byungchan Kim, Matvey Adzhigirey
# Copyright Schrodinger, LLC. All rights reserved.
import numpy
import schrodinger.utils.cmdline as cmdline
from schrodinger import structure
from schrodinger.infra import mm
PRECISION = 5
ENERGY_BULK = -19.67
[docs]def score_ligand(watermap_st, lig_st, scale_factor):
"""
Calculates interaction entropy, enthalpy, and free energy between the
watermap and the specified ligand.
Also calculates the overlap for each site.
"""
wm = mm.WaterMapStructure(watermap_st.handle)
lig_score = mm.LigandScoreStructure(wm, lig_st.handle, scale_factor)
entropies = numpy.array(lig_score.getTdSSite()).round(decimals=PRECISION)
enthalpies = numpy.array(lig_score.getdHSite()).round(decimals=PRECISION)
dGs = numpy.array(lig_score.getdGSite()).round(decimals=PRECISION)
overlaps = numpy.array(lig_score.getOverlapSite()).round(decimals=PRECISION)
return (entropies, enthalpies, dGs, overlaps)
if __name__ == "__main__":
usage = ""
cmd = cmdline.SingleDashOptionParser(usage=usage)
opt, args = cmd.parse_args()
wm_ct = structure.Structure.read(args[0])
lig_ct = structure.Structure.read(args[1])
score_ligand(wm_ct, lig_ct, 0.8)