Skip to content
Snippets Groups Projects
Commit e226f270 authored by Alexander Rose's avatar Alexander Rose
Browse files

fixed wrong property use in seq widget

parent 804a04d9
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ import { PluginUIComponent } from './base';
import { StateTreeSpine } from '../../mol-state/tree/spine';
import { PluginStateObject as SO } from '../state/objects';
import { Sequence } from './sequence/sequence';
import { Structure, StructureElement, StructureProperties as SP } from '../../mol-model/structure';
import { Structure, StructureElement, StructureProperties as SP, Unit } from '../../mol-model/structure';
import { SequenceWrapper } from './sequence/wrapper';
import { PolymerSequenceWrapper } from './sequence/polymer';
import { StructureElementSelectionManager } from '../util/structure-element-selection';
......@@ -75,7 +75,12 @@ function getChainOptions(structure: Structure, entityId: string) {
const id = unit.invariantId
if (seen.has(id)) continue
let label = `${SP.chain.label_asym_id(l)}: ${SP.chain.auth_asym_id(l)}`
let label = ''
if (Unit.isAtomic(unit)) {
label = `${SP.chain.label_asym_id(l)}: ${SP.chain.auth_asym_id(l)}`
} else {
label = `${SP.coarse.asym_id(l)}`
}
if (SP.entity.type(l) === 'water') {
const count = water.get(label) || 1
water.set(label, count + 1)
......
......@@ -72,7 +72,7 @@ export class PolymerSequenceWrapper extends SequenceWrapper<StructureUnit> {
this.missing = data.unit.model.properties.missingResidues
this.modelNum = data.unit.model.modelNum
this.asymId = SP.chain.label_asym_id(l)
this.asymId = Unit.isAtomic(data.unit) ? SP.chain.label_asym_id(l) : SP.coarse.asym_id(l)
const missing: number[] = []
for (let i = 0; i < length; ++i) {
......
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