Skip to content
Snippets Groups Projects
Commit e2c74498 authored by Michal Malý's avatar Michal Malý
Browse files

Use NtC tube and separate representations for nucleic and protein

substructures
parent 1f3b16e6
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ export class ReDNATCOMspApiImpl implements ReDNATCOMspApi.Object { ...@@ -34,7 +34,7 @@ export class ReDNATCOMspApiImpl implements ReDNATCOMspApi.Object {
return !!this.target; return !!this.target;
} }
loadStructure(coords: { data: string, type: 'cif' | 'pdb' }, densityMaps: { data: Uint8Array, type: 'ccp4' | 'dsn6', kind: '2fo-fc' | 'fo-fc' | 'em' }[] | null) { loadStructure(coords: { data: string, type: ReDNATCOMspApi.CoordinatesFormat }, densityMaps: { data: Uint8Array, type: ReDNATCOMspApi.DensityMapFormat, kind: ReDNATCOMspApi.DensityMapKind }[] | null) {
this.check(); this.check();
this.target!.loadStructure(coords, densityMaps); this.target!.loadStructure(coords, densityMaps);
} }
......
import { Filters } from './filters'; import { Filters } from './filters';
export namespace ReDNATCOMspApi { export namespace ReDNATCOMspApi {
export type CoordinatesFormat = 'cif' | 'pdb';
export type DensityMapFormat = 'ccp4' | 'dsn6';
export type DensityMapKind = '2fo-fc' | 'fo-fc' | 'em';
export namespace Payloads { export namespace Payloads {
export type StepSelection = { export type StepSelection = {
name: string; name: string;
...@@ -126,7 +130,7 @@ export namespace ReDNATCOMspApi { ...@@ -126,7 +130,7 @@ export namespace ReDNATCOMspApi {
event: (evt: Event) => void; event: (evt: Event) => void;
init: (elemId: string, onEvent?: (evt: Event) => void) => void; init: (elemId: string, onEvent?: (evt: Event) => void) => void;
isReady: () => boolean; isReady: () => boolean;
loadStructure: (coords: { data: string, type: 'cif' | 'pdb'}, densityMaps: { data: Uint8Array, type: 'ccp4' | 'dsn6', kind: '2fo-fc' | 'fo-fc' | 'em' }[] | null) => void; loadStructure: (coords: { data: string, type: CoordinatesFormat }, densityMaps: { data: Uint8Array, type: DensityMapFormat, kind: DensityMapKind }[] | null) => void;
query: <T extends Queries.Type>(type: T) => ResponseTypes[T]; query: <T extends Queries.Type>(type: T) => ResponseTypes[T];
} }
} }
import React from 'react'; import React from 'react';
import { ReDNATCOMspApi as Api } from './api';
import { ColorPicker } from './color-picker'; import { ColorPicker } from './color-picker';
import { ColorBox, RangeSlider, SpinBox, ToggleButton } from './controls'; import { ColorBox, RangeSlider, SpinBox, ToggleButton } from './controls';
import { DensityMapDisplay, DensityMapKind } from './index'; import { DensityMapDisplay } from './index';
import { isoBounds, isoToFixed } from './util'; import { isoBounds, isoToFixed } from './util';
import { ReDNATCOMspViewer as Viewer } from './viewer'; import { ReDNATCOMspViewer as Viewer } from './viewer';
import { Color } from '../../mol-util/color'; import { Color } from '../../mol-util/color';
...@@ -135,7 +136,7 @@ export class DensityMapControls extends React.Component<DensityMapControls.Props ...@@ -135,7 +136,7 @@ export class DensityMapControls extends React.Component<DensityMapControls.Props
return ctrls; return ctrls;
} }
private mapName(kind: DensityMapKind) { private mapName(kind: Api.DensityMapKind) {
switch (kind) { switch (kind) {
case '2fo-fc': case '2fo-fc':
return <span>2Fo-Fc</span>; return <span>2Fo-Fc</span>;
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ export namespace Traverse { ...@@ -23,7 +23,7 @@ export namespace Traverse {
// TODO: We will be able to use a function from DnatcoUtils once it gets upstreamed // TODO: We will be able to use a function from DnatcoUtils once it gets upstreamed
const _loc = StructureElement.Location.create(); const _loc = StructureElement.Location.create();
export function findResidue(asymId: string, seqId: number, altId: string|undefined, insCode: string, loci: StructureElement.Loci, source: 'label'|'auth') { export function findResidue(asymId: string, seqId: number, altId: string | undefined, insCode: string, loci: StructureElement.Loci, source: 'label' | 'auth') {
_loc.structure = loci.structure; _loc.structure = loci.structure;
for (const e of loci.elements) { for (const e of loci.elements) {
_loc.unit = e.unit; _loc.unit = e.unit;
...@@ -76,9 +76,9 @@ export namespace Traverse { ...@@ -76,9 +76,9 @@ export namespace Traverse {
export function findStep( export function findStep(
asymId: string, asymId: string,
seqId1: number, altId1: string|undefined, insCode1: string, seqId1: number, altId1: string | undefined, insCode1: string,
seqId2: number, altId2: string|undefined, insCode2: string, seqId2: number, altId2: string | undefined, insCode2: string,
loci: StructureElement.Loci, source: 'label'|'auth' loci: StructureElement.Loci, source: 'label' | 'auth'
) { ) {
const first = findResidue(asymId, seqId1, altId1, insCode1, loci, source); const first = findResidue(asymId, seqId1, altId1, insCode1, loci, source);
if (first.kind === 'empty-loci') if (first.kind === 'empty-loci')
......
This diff is collapsed.
...@@ -56,4 +56,3 @@ export const DnatcoNtCs = PluginBehavior.create<{ autoAttach: boolean, showToolT ...@@ -56,4 +56,3 @@ export const DnatcoNtCs = PluginBehavior.create<{ autoAttach: boolean, showToolT
showToolTip: PD.Boolean(true) showToolTip: PD.Boolean(true)
}) })
}); });
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