diff --git a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts index c0c1fdd3e3e6d12d06740794e7c38026d827f9dd..d88fb6bccbe0cd2d8f96887677465d9e1c31be5d 100644 --- a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts +++ b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts @@ -18,7 +18,8 @@ export const ShrakeRupleyComputationParams = { numberOfSpherePoints: PD.Numeric(92, { min: 12, max: 360, step: 1 }, { 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, { min: 0.1, max: 4, step: 0.01 }, { 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(false, { description: 'Include non-polymer atoms as occluders.' }) + nonPolymer: PD.Boolean(false, { description: 'Include non-polymer atoms as occluders.' }), + alphaOnly: PD.Boolean(false, { description: 'Compute only using alpha-carbons, if true increase probeSize accordingly (e.g., 4 A).' }) }; export type ShrakeRupleyComputationParams = typeof ShrakeRupleyComputationParams export type ShrakeRupleyComputationProps = PD.Values<ShrakeRupleyComputationParams> @@ -57,12 +58,13 @@ namespace AccessibleSurfaceArea { function initialize(structure: Structure, props: ShrakeRupleyComputationProps): ShrakeRupleyContext { const { elementCount, atomicResidueCount } = structure; - const { probeSize, nonPolymer, numberOfSpherePoints } = props; + const { probeSize, nonPolymer, alphaOnly, numberOfSpherePoints } = props; return { structure, probeSize, nonPolymer, + alphaOnly, spherePoints: generateSpherePoints(numberOfSpherePoints), scalingConstant: 4.0 * Math.PI / numberOfSpherePoints, maxLookupRadius: 2 * props.probeSize + 2 * VdWLookup[2], // 2x probe size + 2x largest VdW diff --git a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/common.ts b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/common.ts index f91384826825ca2276c9e49b31e5e14d465ea898..bce9376ea82d182c0c8c9093a1cba64b72349b35 100644 --- a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/common.ts +++ b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/common.ts @@ -12,6 +12,7 @@ export interface ShrakeRupleyContext { spherePoints: Vec3[], probeSize: number, nonPolymer: boolean, + alphaOnly: boolean, scalingConstant: number, maxLookupRadius: number, atomRadiusType: Int8Array, diff --git a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.ts b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.ts index 3b469df371058495ac765f06bc41f6ae032a5d03..38cdcb63313afd4be7fbf70483962a591efadf4f 100644 --- a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.ts +++ b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.ts @@ -50,15 +50,15 @@ export function assignRadiusForHeavyAtoms(ctx: ShrakeRupleyContext) { continue; } + const atomId = label_atom_id(l); const moleculeType = getElementMoleculeType(unit, eI); // skip water and optionally non-polymer groups - if (moleculeType === MoleculeType.Water || (!ctx.nonPolymer && !isPolymer(moleculeType))) { + if (moleculeType === MoleculeType.Water || (!ctx.nonPolymer && !isPolymer(moleculeType)) || (ctx.alphaOnly && atomId !== 'CA')) { atomRadiusType[mj] = VdWLookup[0]; serialResidueIndex[mj] = -1; continue; } - const atomId = label_atom_id(l); const compId = label_comp_id(l); if (isNucleic(moleculeType)) {