I wrote a script to “idealize” a protein using the new conformation dependent library (Berkholz et al. 2009).
All my statements evaluate fine by themselves but when I run the loop a segfault occurs. Anyone have any hints?
I’d paste the entire script but it’s essentially unreadable here (sorry).
See http://libra.sfsu.edu/~dasarnow/CDIdeal.py
The business end of the code looks like this:
for i in range(1,ni.total_residue()+1):
fields, geometry_bin = pgd.angles.get_geometry(dbdict,ni.residue(i).name(),ni.residue(i+1).name(),ni.phi(i),ni.psi(i))
geometry = [float(x) for x in str(geometry_bin).split(“t”)]
L1 = geometry[11]; L2 = geometry[13]; **&c. for all the angles and lengths**
Ni = AtomID(1,i)
Cai = AtomID(2,i)
Ci = AtomID(3,i)
ni.conformation().set_bond_length(Ni,Cai,L2)
ni.conformation().set_bond_angle(Ni,Cai,Ci,t3)