Hi Nikolaos,
Chimera doesn’t store that information, so there’s no direct way to find out.  Obviously, you could loop through your residues beforehand and do “r.phi = r.phi” and catch ValueError to mark the residues involved in cycles.
The other option is to edit phipsi.py in /home/nick/.local/UCSF-Chimera64-1.11.2/share/chimera and in the setPhi and setPsi functions add ValueError to the list of errors that it ignores.

—Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jun 26, 2017, at 11:31 AM, Nikolaos Bismpikos <nikolaosbismpikos@gmail.com> wrote:

Hey, my goal is to change the dihedrals of an already existing pdb template in order to find low-energy protein conformations.

The issue I have here is that for some residues the dihedrals phi and psi cannot be changed. That's the error I get:

Traceback (most recent call last):
  File "/home/nick/.local/UCSF-Chimera64-1.11.2/share/chimeraInit.py", line 683, in init
    chimera.openModels.open(a, prefixableType=1)
  File "/home/nick/.local/UCSF-Chimera64-1.11.2/share/chimera/__init__.py", line 1929, in open
    models = func(filename, *args, **kw)
  File "/home/nick/.local/UCSF-Chimera64-1.11.2/share/chimera/__init__.py", line 1299, in _openPython
    loadFunc(sandboxName, fileName, f)
  File "predictor.py", line 40, in <module>
    es.main_loop();
  File "/home/nick/Python/pdb/AbstractOptimizer.py", line 97, in main_loop
    self.fs, self.evals, self.terminate = self.eval_pop(self.eval_func,self.pop,self.evals,self.eval_budget,self.extra_par)
  File "/home/nick/Python/pdb/eval_energy.py", line 20, in eval_energy
    allR[j].phi = pop[i,j];
  File "/home/nick/.local/UCSF-Chimera64-1.11.2/share/chimera/phipsi.py", line 98, in setPhi
    _setAngle(bond, phi, getPhi(res, missingIsError=True), "phi", anchorSide)
  File "/home/nick/.local/UCSF-Chimera64-1.11.2/share/chimera/phipsi.py", line 147, in _setAngle
    br = BondRot(bond)
ValueError: bond is part of a cycle


Is there a way to determine beforehand which bonds are part of circle and hence which residues' dihedral information cannot be changed?

Thank you in advanced for your time,

Nikolaos Bismpikos
_______________________________________________
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu
Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users