PDB_SORT(1)
β¨ PDB_SORT(1) β¨
okay bestie, welcome to the pdb_sort manual page β this is the User Commands corner of the man pages and honestly? it ate. sit down, grab a boba, we're reorganizing a PDB file together π«Ά
πΈ NAME πΈ
pdb_sort β the manual page for pdb_sort 2.5.1. that's it, that's the name, she's simple and she's iconic π
π DESCRIPTION π
so like, if you ever see this:
pdb_sort Sorting key is not valid: '-'
that's her telling you the sorting key you handed over is a no. not valid, bestie. moving on π
pdb_sort sorts the ATOM/HETATM/ANISOU/CONECT records in a PDB file. it's giving organizational queen β¨
here's the whole sorting agenda, no cap:
- Atoms are always sorted by their serial number β meaning the original ordering of the atoms within each residue is not changed. the vibes inside a residue stay exactly as they were.
- Alternate locations are sorted by default. yes queen, default behavior, we love a default.
- Residues are sorted according to their residue sequence number, and then by their insertion code (if any). sequence number first, icode as the tiebreaker, main character energy π
- Chains are sorted by their chain identifier.
and then, finally, the file is sorted by all keys, and the records get placed in this exact order:
ATOM/ANISOU, intercalated if the latter exist βHETATMβCONECT, sorted by the serial number of the central (first) atom
π¨ okay important things, listen up:MASTER,TER, andENDstatements are removed. literally gone. Headers (HEADER,REMARK, etc) are kept and placed first. and does NOT support multi-model files β like, at all. if you've got a multi-model file, the move is: usepdb_splitmodel, thenpdb_sorton each model, and thenpdb_mkensemble. do it in that order or perish π
π¦ Usage π¦
python pdb_sort.py -<option> <pdb file>
π Example π
python pdb_sort.py 1CTF.pdb
# sorts by chain and residues
python pdb_sort.py -C 1CTF.pdb
# sorts by chain (A, B, C ...) only
python pdb_sort.py -R 1CTF.pdb
# sorts by residue number/icode only
π THE pdb-tools LORE π
this program is part of the pdb-tools suite of utilities and should not be distributed isolatedly. keep the family together fr fr π«
the pdb-tools were created to quickly manipulate PDB files using the terminal, and can be used sequentially, with one tool streaming data to another. pipeline queen behavior, we're obsessed π
they are based on old FORTRAN77 code that was taking too much effort to maintain and compile. RIP. πͺ¦π
okay that's the whole page bestie, you're officially educated β¨ this was pdb_sort 2.5.1, September 2024, and it's PDB_SORT(1) β go sort something, slay π
ππ¦
π¦ where this page comes from
- debian trixie: pdb-tools 2.5.1-2 Β· Apache-2.0
- ubuntu questing: pdb-tools 2.5.1-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms