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 {
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.target!.loadStructure(coords, densityMaps);
}
......
import { Filters } from './filters';
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 type StepSelection = {
name: string;
......@@ -126,7 +130,7 @@ export namespace ReDNATCOMspApi {
event: (evt: Event) => void;
init: (elemId: string, onEvent?: (evt: Event) => void) => void;
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];
}
}
import React from 'react';
import { ReDNATCOMspApi as Api } from './api';
import { ColorPicker } from './color-picker';
import { ColorBox, RangeSlider, SpinBox, ToggleButton } from './controls';
import { DensityMapDisplay, DensityMapKind } from './index';
import { DensityMapDisplay } from './index';
import { isoBounds, isoToFixed } from './util';
import { ReDNATCOMspViewer as Viewer } from './viewer';
import { Color } from '../../mol-util/color';
......@@ -135,7 +136,7 @@ export class DensityMapControls extends React.Component<DensityMapControls.Props
return ctrls;
}
private mapName(kind: DensityMapKind) {
private mapName(kind: Api.DensityMapKind) {
switch (kind) {
case '2fo-fc':
return <span>2Fo-Fc</span>;
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ export namespace Traverse {
// TODO: We will be able to use a function from DnatcoUtils once it gets upstreamed
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;
for (const e of loci.elements) {
_loc.unit = e.unit;
......@@ -76,9 +76,9 @@ export namespace Traverse {
export function findStep(
asymId: string,
seqId1: number, altId1: string|undefined, insCode1: string,
seqId2: number, altId2: string|undefined, insCode2: string,
loci: StructureElement.Loci, source: 'label'|'auth'
seqId1: number, altId1: string | undefined, insCode1: string,
seqId2: number, altId2: string | undefined, insCode2: string,
loci: StructureElement.Loci, source: 'label' | 'auth'
) {
const first = findResidue(asymId, seqId1, altId1, insCode1, loci, source);
if (first.kind === 'empty-loci')
......
This diff is collapsed.
......@@ -56,4 +56,3 @@ export const DnatcoNtCs = PluginBehavior.create<{ autoAttach: boolean, showToolT
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