Skip to content
Snippets Groups Projects
Commit d60c88c5 authored by DESKTOP-O6LIMN9\ludov's avatar DESKTOP-O6LIMN9\ludov
Browse files

parsing the selection string

parent 7266aab4
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,8 @@ export interface Ingredient { ...@@ -54,8 +54,8 @@ export interface Ingredient {
source: IngredientSource; source: IngredientSource;
results: [Vec3, Quat][]; results: [Vec3, Quat][];
name: string; name: string;
positions?: [Positions];//Vec3[]]; positions?: [Positions];//Vec3[]];CoarseGraind Beads coordinates LOD
radii?: [Radii];//number[]]; radii?: [Radii];//number[]];CoarseGraind Beads radii LOD
/** Number of `curveX` properties in the object where `X` is a 0-indexed number */ /** Number of `curveX` properties in the object where `X` is a 0-indexed number */
nbCurve?: number; nbCurve?: number;
/** Curve properties are Vec3[] but that is not expressable in TypeScript */ /** Curve properties are Vec3[] but that is not expressable in TypeScript */
......
...@@ -57,7 +57,9 @@ async function getStructure(model: Model, source:IngredientSource, props: { asse ...@@ -57,7 +57,9 @@ async function getStructure(model: Model, source:IngredientSource, props: { asse
structure = await StructureSymmetry.buildAssembly(structure, assembly).run() structure = await StructureSymmetry.buildAssembly(structure, assembly).run()
} }
if (source.selection){ 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([ const query = MS.struct.modifier.union([
MS.struct.generator.atomGroups({ MS.struct.generator.atomGroups({
'chain-test': MS.core.set.has([MS.set(...asymIds), MS.ammp('label_asym_id')]) 'chain-test': MS.core.set.has([MS.set(...asymIds), MS.ammp('label_asym_id')])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment