from chimera import openModels, Moleculefor m in openModels.list(modelTypes=[Molecule]): for a in m.atoms: a.bfactor = a.residue.ramaProb