Forráskód Böngészése

parsing the selection string

DESKTOP-O6LIMN9\ludov 5 éve
szülő
commit
d60c88c506

+ 2 - 2
src/apps/viewer/extensions/cellpack/data.ts

@@ -54,8 +54,8 @@ export interface Ingredient {
     source: IngredientSource;
     results: [Vec3, Quat][];
     name: string;
-    positions?: [Positions];//Vec3[]];
-    radii?: [Radii];//number[]];
+    positions?: [Positions];//Vec3[]];CoarseGraind Beads coordinates LOD
+    radii?: [Radii];//number[]];CoarseGraind Beads radii LOD
     /** Number of `curveX` properties in the object where `X` is a 0-indexed number */
     nbCurve?: number;
     /** Curve properties are Vec3[] but that is not expressable in TypeScript */

+ 3 - 1
src/apps/viewer/extensions/cellpack/model.ts

@@ -57,7 +57,9 @@ async function getStructure(model: Model, source:IngredientSource, props: { asse
         structure = await StructureSymmetry.buildAssembly(structure, assembly).run()
     }
     if (source.selection){
-        const asymIds:string[] = source.selection.split(":")
+        //use NGL selection string or :A or :B etc...
+        const asymIds:string[] = source.selection.replace(" :","").split(" or")
+        console.log(asymIds)
         const query = MS.struct.modifier.union([
             MS.struct.generator.atomGroups({
                 'chain-test': MS.core.set.has([MS.set(...asymIds), MS.ammp('label_asym_id')])