Skip to content
Snippets Groups Projects
Commit 05a4321d authored by Sebastian Bittrich's avatar Sebastian Bittrich
Browse files

unbiased VDW radius assignment for non-polymer atoms

parent fb60cb58
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ import Unit from '../../unit'
import { Vec3 } from 'mol-math/linear-algebra';
import { AccessibleSurfaceAreaComputationParams, AccessibleSurfaceArea, SolventAccessibility } from './data';
import { isHydrogen, getElementIdx } from '../links/common'; // TODO these functions are relevant for many tasks: move them somewhere actually common
import { ElementSymbol, MaxAsa, DefaultMaxAsa, isPolymer, isNucleic } from 'mol-model/structure/model/types';
import { ElementSymbol, MaxAsa, DefaultMaxAsa, isPolymer, isNucleic, MoleculeType } from 'mol-model/structure/model/types';
import { VdwRadius } from 'mol-model/structure/model/properties/atomic/measures';
import { ParamDefinition as PD } from 'mol-util/param-definition'
......@@ -67,7 +67,9 @@ function normalizeAccessibleSurfaceArea(ctx: AccessibleSurfaceAreaContext) {
for (let i = 0; i < residues.label_comp_id.rowCount; ++i) {
// skip entities not part of a polymer chain
if (!ctx.params.nonPolymer && !isPolymer(derived.residue.moleculeType[i])) continue;
if (!ctx.params.nonPolymer) {
if (!isPolymer(derived.residue.moleculeType[i])) continue;
}
const maxAsa = (MaxAsa as any)[residues.label_comp_id.value(i)];
const rasa = accessibleSurfaceArea![i] / (maxAsa === undefined ? DefaultMaxAsa : maxAsa);
......@@ -174,16 +176,18 @@ function assignRadiusForHeavyAtoms(ctx: AccessibleSurfaceAreaContext) {
}
// skip non-polymer groups
if (!ctx.params.nonPolymer && !isPolymer(moleculeType[raI])) {
ctx.atomRadius[aI] = missingAccessibleSurfaceAreaValue;
continue;
if (!ctx.params.nonPolymer) {
if (!isPolymer(moleculeType[raI])) {
ctx.atomRadius[aI] = missingAccessibleSurfaceAreaValue;
continue;
}
}
const atomId = label_atom_id.value(aI);
const element = type_symbol.value(aI);
const resn = label_comp_id.value(raI)!;
ctx.atomRadius[aI] = isNucleic(moleculeType[raI]) ? determineRadiusNucl(atomId, element, resn) : determineRadiusAmino(atomId, element, resn);
ctx.atomRadius[aI] = isNucleic(moleculeType[raI]) ? determineRadiusNucl(atomId, element, resn) : moleculeType[raI] === MoleculeType.protein ? determineRadiusAmino(atomId, element, resn) : VdwRadius(element);
}
}
......
......@@ -18,7 +18,7 @@ export const AccessibleSurfaceAreaComputationParams = {
numberOfSpherePoints: PD.Numeric(92, {}, { description: 'number of sphere points to sample per atom: 92 (original paper), 960 (BioJava), 3000 (EPPIC) - see Shrake A, Rupley JA: Environment and exposure to solvent of protein atoms. Lysozyme and insulin. J Mol Biol 1973.' }),
probeSize: PD.Numeric(1.4, {}, { description: 'corresponds to the size of a water molecule: 1.4 (original paper), 1.5 (occassionally used)' }),
buriedRasaThreshold: PD.Numeric(0.16, { min: 0.0, max: 1.0 }, { description: 'below this cutoff of relative accessible surface area a residue will be considered buried - see: Rost B, Sander C: Conservation and prediction of solvent accessibility in protein families. Proteins 1994.' }),
nonPolymer: PD.Boolean(true, { description: 'Include non-polymer atoms in computation.' })
nonPolymer: PD.Boolean(false, { description: 'Include non-polymer atoms in computation.' })
}
export namespace SolventAccessibility {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment