SAMSON Forum
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • SAMSON Connect
    • Get SAMSON

    Get Children of Node

    Apps
    2
    3
    2645
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Maximilian last edited by

      Hi,
      Is there a way to get for example all Residues of a given Chain?
      I tried it like this:

      SAMSON::getActiveDocument()->getNodes(indexer, SBNode::IsType(SBNode::Residue) && SBNode::GetParent()==parent);
      

      parent beeing a SBNode* representing the given Chain, but this writes nothing into my indexer.

      br,
      Max

      1 Reply Last reply Reply Quote 0
      • Stephane
        Stephane last edited by Stephane

        This should work if the residues are direct children of the chain. Else, you can do:

        parent->getNodes(indexer, SBNode::IsType(SBNode::Residue));
        
        1 Reply Last reply Reply Quote 0
        • M
          Maximilian last edited by

          yes you are right both ways work fine.
          I had a bug I was unaware of in a different position.

          thx!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post