Hi Thomas,

Probably something like this should do something close to what you need:

sed -n '/^\(ATOM\|HETATM\)/s/^.\{16\}\(.\{10\}\)/\1 \0/p' file.pdb | sort -n -k 3 | cut -b 11-

Hope it helps,

Tsjerk



On Thu, May 30, 2013 at 10:21 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Dear PyMOL users/developers,

Is there any way to rearrange the atom records in a .pdb file according to their residue ID? I have run Vina with flexible sidechains and then concatenated the rigid receptor part with the sidechain conformations for each pose. That resulted to .pdb files where the backbone atoms (apart from Ca) occur in the correct order but the flexible sidechain atoms are at the end of the file. That leads to some problems in visualization and analysis of the protein-ligand complexes that I'd like to overcome. If anyone know how to fix that problem either with PyMOL or any other program please let me know.

thanks,
Thomas


--

======================================================================

Thomas Evangelidis

PhD student

University of Athens
Faculty of Pharmacy
Department of Pharmaceutical Chemistry
Panepistimioupoli-Zografou
157 71 Athens
GREECE

email: tevang@pharm.uoa.gr

          tevang3@gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/



------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



--
Tsjerk A. Wassenaar, Ph.D.