Skip to content
Snippets Groups Projects
Commit 226121a9 authored by David Sehnal's avatar David Sehnal
Browse files

Fixed coarse model issues

parent 0f8e1416
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,6 @@ import { MeshBuilder } from '../../shape/mesh-builder';
import { createTransforms, createColors } from './utils';
import { ColorTheme } from '../../theme';
import VertexMap from '../../shape/vertex-map';
import CoarseGrained from 'mol-model/structure/model/properties/coarse-grained';
import { icosahedronVertexCount } from '../../primitive/icosahedron';
export const DefaultSpacefillProps = {
......@@ -38,7 +37,7 @@ function createSpacefillMesh(unit: Unit, elementGroup: ElementGroup, detail: num
let radius: Element.Property<number>
if (Unit.isAtomic(unit)) {
radius = Queries.props.atom.vdw_radius
} else if (Unit.isCoarse(unit) && unit.elementType === CoarseGrained.ElementType.Sphere) {
} else if (Unit.isSpheres(unit)) {
radius = Queries.props.coarse_grained.sphere_radius
} else {
console.warn('Unsupported unit type')
......
......@@ -21,8 +21,8 @@ function createChainIdMap(unit: Unit) {
asym_id = unit.hierarchy.chains.label_asym_id
count = unit.hierarchy.chains._rowCount
} else if (Unit.isCoarse(unit)) {
asym_id = unit.siteBases.asym_id
count = unit.siteBases.count
asym_id = unit.sites.asym_id
count = unit.sites.count
} else {
console.warn('Unknown unit type')
return { map, count: index }
......
......@@ -5,7 +5,6 @@
*/
import { ElementGroup, Element, Unit, Queries } from 'mol-model/structure';
import CoarseGrained from 'mol-model/structure/model/properties/coarse-grained';
import { StructureSizeDataProps } from '.';
import { createAttributeSize } from '../../../util/size-data';
......@@ -16,7 +15,7 @@ export function elementSizeData(props: StructureSizeDataProps) {
let radius: Element.Property<number>
if (Unit.isAtomic(unit)) {
radius = Queries.props.atom.vdw_radius
} else if (Unit.isCoarse(unit) && unit.elementType === CoarseGrained.ElementType.Sphere) {
} else if (Unit.isSpheres(unit)) {
radius = Queries.props.coarse_grained.sphere_radius
}
const l = Element.Location()
......
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