PDB_SORT(1)

πŸ“¦
version 2.5.1 Β· 3 versions
, in debian trixie, ubuntu questing

✨ 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, and END statements 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: use pdb_splitmodel, then pdb_sort on each model, and then pdb_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