Thanks Thomas,
I tried your solution (adapted to my code) and now everything is working.
def set_phi(res_num, res_name, phi):
if res_num != 0 and res_name != 'PRO':
cmd.set_dihedral('resi %s and name C' % (res_num-1), 'resi %s and
name N' % res_num, 'resi %s and name CA' % res_num, '
Hi Osvaldo,
unfortunately PyMOL doesn't handle to set dihedrals in rings, so you have to
break the ring first. Consider this:
def set_phi(resi, phi, state=1, quiet=1):
x = cmd.index('(first (resi %s and guide)) extend 2 and name C+N+CA' % resi)
try:
a = cmd.get_model(x[2], state)
Hi everybody,
I can“t change the phi angle of proline using the function below. It works
for all other amino acids. If quiet = 0, it prints the value of the
variable "phi" (i.e. the value that the phi_angle should adopt). The phi
angle of proline is always around ~11.0
def set_phi(res_num, phi):