mirror of
https://github.com/rdk/p2rank.git
synced 2026-06-04 12:44:24 +08:00
Fix DCC criterion to use predefined site centroid for ResidueSites
DCC was computing site.atoms.centroid (geometric center of resolved residue atoms) instead of site.getCentroid(). For ResidueSites this returns the predefined centroid from the input file, which is the authoritative binding site location. For Ligands this changes from geometric to mass-weighted center (negligible difference).
This commit is contained in:
@@ -19,17 +19,18 @@ class DCC extends PocketCriterium {
|
||||
this.cutoff = cutoff
|
||||
}
|
||||
|
||||
// Uses geometric center (Atoms.centroid — unweighted arithmetic mean of coordinates).
|
||||
// Note: BindingSite.getCentroid() returns mass-weighted center (Atoms.centerOfMass), not geometric center.
|
||||
// Uses BindingSite.getCentroid():
|
||||
// Ligand: atoms.centerOfMass (mass-weighted center)
|
||||
// ResidueSite: predefined centroid from input file
|
||||
|
||||
@Override
|
||||
boolean isIdentified(BindingSite site, Pocket pocket, EvalContext context) {
|
||||
return cutoff >= Struct.dist(site.atoms.centroid, pocket.centroid)
|
||||
return cutoff >= Struct.dist(site.centroid, pocket.centroid)
|
||||
}
|
||||
|
||||
@Override
|
||||
double score(BindingSite site, Pocket pocket) {
|
||||
return cutoff - Struct.dist(site.atoms.centroid, pocket.centroid)
|
||||
return cutoff - Struct.dist(site.centroid, pocket.centroid)
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user