Re: [PyMOL] multiple occupancies

2012-03-02 Thread Thomas Holder
Hi Anasuya, your "pdbid" variable actually holds the file name (including extension), so the delete statement fails. Fix it like this: cmd.delete(pdbid.split('.')[0]) Cheers, Thomas Anasuya Dighe wrote, On 03/02/12 19:38: > Hi, > I am running this code on some pdb files: 12gs.pdb, 182l.p

[PyMOL] multiple occupancies

2012-03-02 Thread Anasuya Dighe
Hi, I am running this code on some pdb files: 12gs.pdb, 182l.pdb, 183l.pdb CODE from pymol import cmd def process_line(x): pdbid,res,chain,num = x.split() cmd.load(pdbid) cmd.select("target","(resn %s and chain %s and resi %s)"%(res,chain,num)) cmd.select("zone2","(br. (target expand