#import re
#
#import chimera
#
#MAINCHAIN = re.compile("^(N|CA|C)$", re.I)
#
#def mainchain(atomMode, bondMode):
#    for m in chimera.openModels.list(modelTypes=[chimera.Molecule]):
#        for a in m.atoms:
#            if MAINCHAIN.match(a.name):
#                a.drawMode = atomMode
#        for b in m.bonds:
#            ends = b.atoms
#            if MAINCHAIN.match(ends[0].name) \
#            and MAINCHAIN.match(ends[1].name):
#                b.drawMode = bondMode
