In many applications you need to constrain PDB files to certain chains. You can do it using this program.
A. What does it do?
Given a pdb file, write out the ATOM and HETATM entries for the supplied chain(s).
PDB_constrain needs three arguments:
- PDB file to constrain.
- Chains from the pdb file to constrain.
- Output file.
B. Requirements:
Biopython – should be installed on your machines but in case you want to use it locally, download the latest version into the PDB_constrain.py’s directory (don’t need to build).
C. Example use:
C.1 Constrain 1A2Y.pdb to chains A and B – write results in constr.pdb
python PDB_constrain.py -f 1A2Y.pdb -c AB -o const.pdb
C.2 Constrain 1ACY to chain L, write results in const.pdb – this example shows that the constrainer works well with ‘insertion’ residue numbering as in antibodies where you have 27A, 27B etc.
python PDB_constrain.py -f 1ACY.pdb -c L -o const.pdb