-
Notifications
You must be signed in to change notification settings - Fork 36
IterateOverAllResiduesOfASystem
jleclaire edited this page Apr 25, 2017
·
3 revisions
Iterate over all residues of a system using the ResidueIterator:
#include <BALL/KERNEL/residueIterator.h>
BALL::System S;
...
BALL::ResidueIterator resit = S.beginResidue();
for (; +resit ; ++resit)
{
std::cout << "Current residue: " << resit->getFullName() << std::endl;
}Note that +resit equals resit != S.endResidue() !
import sys
from BALL import *
# read the PDB-file into a BALL::System
f = PDBFile(sys.argv[1])
S = System()
f.read(S)
for residue in residues(S):
print "Current residue: " , residue.getFullName()