I'm fairly new to PyRosetta, but I ran into a strange issue with a custom mover. For a molecule with a non-cannonical backbone, I built a mover which moves specific torsions via the pose.atom_tree().set_torsion_angle() method by picking torsion angles at random and adding a random angle to them (With the hopes of recreating the Small and Shear movers for custom torsion angles). I have succesfully built the mover, however when I apply it to a pose and update the pose in PyMOL, there is no change in the pose's coordinates. Additionally, PyRosetta does not output any errors when I apply my mover. I can also check the torsion I just changed with pose.atom_tree().torsion_angle() and it registers as being changed, but there is no change to the actual coordinates of the pose.
Here's a snippet of my mover:
at = pose.atom_tree() dihe_start = np.random.randint(0, len(self.atoms)-3) old = at.torsion_angle(self.atoms[dihe_start], self.atoms[dihe_start+1], self.atoms[dihe_start+2], self.atoms[dihe_start+3]) new = old + d_angle at.set_torsion_angle(self.atoms[dihe_start], self.atoms[dihe_start+1], self.atoms[dihe_start+2], self.atoms[dihe_start+3], new)
Is there a better way to make a mover for a unspecified torsion angles? And does anyone have clues as to why I the pose structure isn't being updated?
Thanks a bunch!