question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chain-level operations

See original GitHub issue

Hello! How can I copy, delete and transform chains programmatically? Should I do it after trajectory load? (our extension downloading mmCIF data)

    const trajectory = await builders.structure.parseTrajectory(data, 'mmcif');
    await applyTransformations(pdbtmDescriptor, trajectory);

pdbtmDescriptor contains our custom operations that transform the PDB coordinates at level of atoms. I am looking for functions to access and modifies atoms of specified chains with no low level array operations.

        let atomicConformationX = trajectory.data.representative.atomicConformation.x;
        let atomicConformationY = trajectory.data.representative.atomicConformation.y;
        let atomicConformationZ = trajectory.data.representative.atomicConformation.z;

        for (let i = 0; i < atomicConformationX.length; i++) {
            let coords = {
                x: atomicConformationX[i],
                y: atomicConformationY[i],
                z: atomicConformationZ[i]
            };
            coords = applyTransformationMatrix(coords, tmatrix);
            new_x.push(coords.x);
            new_y.push(coords.y);
            new_z.push(coords.z);
        }

I had to overwrite the xyz arrays with new arrays to apply the changes on the structure. Do you have any better or higher level way to achieve the same effect? Thank you.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:27 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
cycle20commented, Jul 1, 2022

Thank you. I can exclude chains by hacking this function. It is just a hard-wired prototyping update, but it works. …and thank you for your patience in guiding me through this problem 😉

1reaction
dsehnalcommented, Jun 30, 2022

This is how the selector is built from the assembly records in mmCIF: https://github.com/molstar/molstar/blob/master/src/mol-model-formats/structure/property/assembly.ts#L62

You should be able to take that and just replace gen.asymIds with your chain names (maybe you will need to use auth_asym_id instead depending on which identifiers you require).

I know this is quite overwhelming as Mol* is a big library, but hopefully we will chew through that 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[1506.02596] Chain-Level String Topology Operations - arXiv
We construct a space of string diagrams, which are a type of fatgraph with some additional data, and show that there are string...
Read more >
Chain level Steenrod operations - Anibal Medina-Mardones
Chain level Steenrod operations. Theoretical and computational aspects. Anibal M. Medina-Mardones. Max Planck Institute for Mathematics in Bonn.
Read more >
Chain-Level String Topology Operations - Semantic Scholar
We describe two major string topology operations, the Chas-Sullivan product and the Goresky-Hingston coproduct, from geometric and algebraic ...
Read more >
Supply chain operations reference - Wikipedia
Supply-chain operations reference (SCOR) model is a process reference model developed and ... configuration or type of supply chain (Level 2), process element...
Read more >
Chain-level representability of simplicial cohomology
by pulling back j-cocycles on the classifying space. The result of the cohomology operation on an j-simplex is then determined by the value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found