Michael, What's going on would become clear if you turned on valence display. Changing the name of a residue doesn't change the underlying chemical representation. Basically, you've got to change the location of the double bond in the histidine ring, or eliminate it in the case of charged his.
You are using PyMOL in a new way -- I've never tried to do this myself, but you should be able to unbond and then rebond the atoms in question using the proper bond orders in order to get the effect you want. Good luck, Warren On Mon, 18 Nov 2002, Michael George Lerner wrote: > > Hi, > > I'm trying to cycle through the various protonation states of a Histidine > residue (HIE,HIP,HID). I have resn and the residue number stored as > 'curr_state' and 'i' respectively. My first shot at a function looked > basically like this (the real function has a a doc string and some gunk to > set up curr_state and i): > > cmd.remove('(hydro and neighbor %s/ND1,NE2)' % i) > if curr_state == 'HIE': > cmd.alter('%s/' % i,'resn="HID"') > elif curr_state == 'HID': > cmd.alter('%s/' % i,'resn="HIP"') > elif curr_state == 'HIP': > cmd.alter('%s/' % i,'resn="HIE"') > cmd.h_add('(%s/)'%i) > cmd.sort() > > After I run this, it looks like nothing has changed. I can use something > like > > iterate (114/),print resn > > to see that the resn has in fact changed, but the hydrogens end up right > where they were when I started. > > I've tried progressively more complex things, like this: > > cmd.remove('(hydro and neighbor %s/ND1,NE2)' % i) > if curr_state == 'HIE': > print "Changing HIE to HID" > cmd.alter('%s/' % i,'resn="HID"') > cmd.alter('%s/ND1' % i,'formal_charge=1.0') > cmd.h_add('%s/ND1' % i) > cmd.alter('%s/NE2' % i,'formal_charge=0.0') > cmd.iterate('%s/ND1,NE2'%i,'print formal_charge,partial_charge') > elif curr_state == 'HID': > print "Changing HID to HIP" > cmd.alter('%s/' % i,'resn="HIP"') > cmd.alter('%s/ND1' % i,'formal_charge=1.0') > cmd.h_add('%s/ND1' % i) > cmd.alter('%s/NE2' % i,'formal_charge=1.0') > cmd.h_add('%s/NE2' % i) > cmd.iterate('%s/ND1,NE2'%i,'print formal_charge,partial_charge') > elif curr_state == 'HIP': > print "Changing HIP to HIE" > cmd.alter('%s/' % i,'resn="HIE"') > cmd.alter('%s/ND1' % i,'formal_charge=0.0') > cmd.alter('%s/NE2' % i,'formal_charge=1.0') > cmd.h_add('%s/NE2' % i) > cmd.iterate('%s/ND1,NE2'%i,'print formal_charge,partial_charge') > cmd.sort() > > But I think I may just be on the wrong track. The last snippet *appears* > to work for NE2 (and not for ND1), but I think that's just because the his > was an HIE to begin with. > > Any hints? > > Thanks, > > -michael > > -- > This isn't a democracy;| _ |Michael Lerner > it's a cheer-ocracy. | ASCII ribbon campaign ( ) | Michigan > -Torrence, Bring It On| - against HTML email X | Biophysics > | / \ | mler...@umich > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users >