Member Site Forums PyRosetta PyRosetta – General adding coordinate constraints Reply To: adding coordinate constraints

#5390
Anonymous

    I had to go all the way to the top to get an answer; this answer is with some help from Dr. Leaver-Fay.

    If you’ve read the Rosetta3 MIE paper, it’s because CoordinateConstraint is functionally a one-body energy, but we need it to be evaluated as a two-body energy (so it re-evaluates when large chunks of pose move).

    The first AtomID is your atom.

    The second is meant to be a fixed-in-space virtual residue which is the root of the AtomTree. The root cannot move; thus this atom is always in the same place. Code OUTSIDE the coordinate constraint detects when your atom has moved relative to the virtual root and triggers calculation of the constraint. The CoordinateConstraint itself does not use the second AtomID.

    You may be able to get away with using the root atom of your AtomTree as the fixed atom, or you can add one of those virtual root.

    There is a utility function for adding the virtual root residue; pose::util::addVirtualResAsRoot. It plays with the fold_tree so you may need to re-check the tree for loop compatibility, or manually build the tree yourself. (I don’t know if it’s wrapped, but it is in 3.2.1 so you can convert the C++ to python yourself?)