diff --git a/src/mol-model-props/computed/interactions/hydrogen-bonds.ts b/src/mol-model-props/computed/interactions/hydrogen-bonds.ts index d16a672f2d50beb83540af08afc6259252d2728f..697b187e3f66b8929dfe3611b2375b0d932d4d2e 100644 --- a/src/mol-model-props/computed/interactions/hydrogen-bonds.ts +++ b/src/mol-model-props/computed/interactions/hydrogen-bonds.ts @@ -21,7 +21,7 @@ import { MoleculeType, ProteinBackboneAtoms } from '../../../mol-model/structure const GeometryParams = { distanceMax: PD.Numeric(3.5, { min: 1, max: 5, step: 0.1 }), - backbone: PD.Boolean(false, { description: 'Include backbone-to-backbone hydrogen bonds' }), + backbone: PD.Boolean(true, { description: 'Include backbone-to-backbone hydrogen bonds' }), accAngleDevMax: PD.Numeric(45, { min: 0, max: 180, step: 1 }, { description: 'Max deviation from ideal acceptor angle' }), donAngleDevMax: PD.Numeric(45, { min: 0, max: 180, step: 1 }, { description: 'Max deviation from ideal donor angle' }), accOutOfPlaneAngleMax: PD.Numeric(90, { min: 0, max: 180, step: 1 }), @@ -32,7 +32,7 @@ type GeometryProps = PD.Values<GeometryParams> const HydrogenBondsParams = { ...GeometryParams, - water: PD.Boolean(false, { description: 'Include water-to-water hydrogen bonds' }), + water: PD.Boolean(true, { description: 'Include water-to-water hydrogen bonds' }), sulfurDistanceMax: PD.Numeric(4.1, { min: 1, max: 5, step: 0.1 }), } type HydrogenBondsParams = typeof HydrogenBondsParams diff --git a/src/mol-model-props/computed/interactions/interactions.ts b/src/mol-model-props/computed/interactions/interactions.ts index 82acd663d72895aea9d9a3a2ef735cadc133bd13..36e147b957f7472073fe559c89eb7e596a7fc798 100644 --- a/src/mol-model-props/computed/interactions/interactions.ts +++ b/src/mol-model-props/computed/interactions/interactions.ts @@ -140,7 +140,7 @@ export const InteractionsParams = { 'halogen-bonds', // 'hydrophobic', 'metal-coordination', - // 'weak-hydrogen-bonds', + 'weak-hydrogen-bonds', ], PD.objectToOptions(ContactProviders)), contacts: PD.Group(ContactsParams, { isFlat: true }), ...getProvidersParams() diff --git a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts index 7a050088b42019d9f508877045d594192fd7e488..c1640a82ed8c3523d34b3b621de499599bd00a0f 100644 --- a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts +++ b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts @@ -38,25 +38,34 @@ enum Tags { ResidueSel = 'structure-interaction-residue-sel', ResidueRepr = 'structure-interaction-residue-repr', SurrSel = 'structure-interaction-surr-sel', - SurrRepr = 'structure-interaction-surr-repr' + SurrRepr = 'structure-interaction-surr-repr', + SurrNciRepr = 'structure-interaction-surr-nci-repr' } -const TagSet: Set<Tags> = new Set([Tags.Group, Tags.ResidueSel, Tags.ResidueRepr, Tags.SurrSel, Tags.SurrRepr]) +const TagSet: Set<Tags> = new Set([Tags.Group, Tags.ResidueSel, Tags.ResidueRepr, Tags.SurrSel, Tags.SurrRepr, Tags.SurrNciRepr]) export class StructureRepresentationInteractionBehavior extends PluginBehavior.WithSubscribers<StructureRepresentationInteractionProps> { private createResVisualParams(s: Structure) { return StructureRepresentation3DHelpers.createParams(this.plugin, s, { - repr: [BuiltInStructureRepresentations['ball-and-stick'], () => ({ sizeAspectRatio: 1 })], - size: [BuiltInSizeThemes.uniform, () => ({ value: 0.6 } )] + repr: [BuiltInStructureRepresentations['ball-and-stick'], () => ({ })], + size: [BuiltInSizeThemes.uniform, () => ({ })] }); } private createSurVisualParams(s: Structure) { return StructureRepresentation3DHelpers.createParams(this.plugin, s, { - repr: [BuiltInStructureRepresentations['ball-and-stick'], () => ({ sizeAspectRatio: 1 })], - color: [BuiltInColorThemes['element-symbol'], () => ({ saturation: -3, lightness: 0.6 })], - size: [BuiltInSizeThemes.uniform, () => ({ value: 0.3 } )] + repr: [BuiltInStructureRepresentations['ball-and-stick'], () => ({ })], + color: [BuiltInColorThemes['element-symbol'], () => ({ })], + size: [BuiltInSizeThemes.uniform, () => ({ })] + }); + } + + private createSurNciVisualParams(s: Structure) { + return StructureRepresentation3DHelpers.createParams(this.plugin, s, { + repr: [BuiltInStructureRepresentations['interactions'], () => ({ })], + color: [BuiltInColorThemes['interaction-type'], () => ({ })], + size: [BuiltInSizeThemes.uniform, () => ({ })] }); } @@ -93,6 +102,11 @@ export class StructureRepresentationInteractionBehavior extends PluginBehavior.W this.createSurVisualParams(cell.obj!.data), { tags: Tags.SurrRepr }).ref; } + if (!refs[Tags.SurrNciRepr]) { + refs[Tags.SurrNciRepr] = builder.to(refs['structure-interaction-surr-sel']!).apply(StateTransforms.Representation.StructureRepresentation3D, + this.createSurNciVisualParams(cell.obj!.data), { tags: Tags.SurrNciRepr }).ref; + } + return { state, builder, refs }; }