<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi JD,<div><span class="Apple-tab-span" style="white-space:pre"> </span>Perhaps this could be improved, but the decision over whether a residue is written with ATOM or HETATM records depends on whether the residue <i>type</i> is considered standard or not. Control over this is provided by chimera.PDBio's addStandardResidue and removeStandardResidue functions. So in your case change:</div><div><br></div><div>a.residue.isHet = False</div><div><br></div><div>to:</div><div><br></div><div>chimera.PDBio.removeStandardResidue(a.residue.type)</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Of course, this will write <i>all</i> residues of that type using HETATM records, not just those in the current selection. Therefore you may instead need to change the type of the modified residues and not bother with removeStandardResidue. Basically it is impossible to make Chimera write some residues of a particular type using ATOM records and others of the same type using HETATM records into the same file.</div><div><br></div><div>--Eric</div><div><div><br> Eric Pettersen<br> UCSF Computer Graphics Lab<br> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a><br><br></div><div><div>On Jan 24, 2014, at 12:49 AM, Jean-Didier Maréchall wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div>Dear all, <br><br></div>I am working with some chemically modified residues. For consistency with MMTK, I have to move non-natural atoms in the ATOM list of the pdb. I would like to do that directly from chimera and not editing the pdbfile. <br>
<br></div><div> I thought that I could alter the heteroatom value of chimera's residues to get there. But whether this is not the right attribute or I miss something. <br><br></div><div>What I do is:<br></div><div>build my system, select the atoms of the non-natural and natural part of the residue. Make a new residue and then, having selected it:<br>
</div><div>atoms=chimera.selection.currentAtoms()<br></div><div>for a in atoms:<br></div><div> a.residue.isHet=False<br><br></div><div>This indeed changes the isHet attribute but when saving the pdb, the residue is in the HETATM field. <br>
<br></div><div>Any pointer?<br><br></div><div>Best,<br></div><div>JD</div></div></div></blockquote></div></div><br><br></body></html>