Set secondary structure
Opened this issue · 5 comments
Is there a way to explicitly set/change secondary structures after loading a molecule?
It is possible, albeit a bit tricky.
Basically you would create a transform that maps Model -> Model and then create rest of the state tree same way as you would without applying the transform.
The transform would look similar to
, but you would need to replacesecondaryStructure
property (https://github.com/dsehnal/LiteMol/blob/master/src/lib/Core/Structure/Molecule.ts#L473) in the data
and secondaryStructureIndex
in the residue table (https://github.com/dsehnal/LiteMol/blob/master/src/lib/Core/Structure/Molecule.ts#L350). This is how you would apply your new transform https://github.com/dsehnal/LiteMol/blob/master/examples/Transforms/src/Process.ts#L109.
Alternatively, you can use the new Mol* viewer (https://molstar.org ; basically a merge of LiteMol and NGL). and I would include an example for you how to do this. When do you need it?
Not urgent. How does Mol* compare to LiteMol in setting/changing the secondary structures? Much simpler? I use LiteMol to show structures and highlight (change color) regions of interest based on user input. Would switching to Mol* fairly straightforward?
Well, currently the sec scruct modification is about the same amount of work as in LiteMol. But if we write the code I would rather do it for the new software.
How do you imagine the workflow for changing the secondary structure?
Mol* code is very similar to LiteMol as far as state management goes. Tho we are now working on simplifying that somewhat.
User uploads a pdb/cif file. We display its amino acid sequence with secondary structure annotations and the 3D structure. Secondary structures are initially determined by DSSP or PyMol on the server after uploading the file. Ideally, the 3D structure showed would use this info. User then is able to change/set secondary structures using the sequence view, and the 3D view will automatically reflect those changes.
Ok, I will see what I can do.