Command line tool: pdbrenumber
| Module | cltools |
|---|---|
| Description | Input |
| Modify atom numbers in a PDB, possibly using hybrid-36 coding | command line args |
Details
Modify atom numbers in a PDB file, possibly using hybrid-36 coding.
When reading a PDB files, PLUMED honors the serial number of each atom. This command can be used to process a PDB file and change the atom serial numbers. Notice that the resulting list might have gaps. It is however fundamental that the atom numbers in your PDB file correspond to those used within the MD code.
Notice, if the serial number of an atom is greater than 99999, it has to be written in hybrid 36 notation (see PDB2CONSTANT ). The main use for this command is to produce files where atoms are numbered using the hybrid-36 convention.
The output PDB file is identical to the input PDB file, except for the atom number field. The rest of the line is written unchanged to the output file, even if it is incorrectly formatted. Residue numbers are not touched, and atom numbers in the input file are ignored.
Examples
By default, pdbreader just sets the numbers progressively starting from 1. For instance the following command:
plumed pdbrenumberModify atom numbers in a PDB, possibly using hybrid-36 coding More details --ipdbspecify the name of the input PDB file input.pdb --opdbspecify the name of the output PDB file output.pdb
will copy file input.pdb to output.pdb replacing all the serial atoms with
increasing numbers starting from one. Atoms that have an index that is greater than 99999 will be written
in the output PDB file in hybrid-36 code.
It is possible to set a different serial number for the first atom, letting the following ones grow by one at each line. Here for instance the first atom will be assigned serial 1000, the second serial 1001, etc:
plumed pdbrenumberModify atom numbers in a PDB, possibly using hybrid-36 coding More details --ipdbspecify the name of the input PDB file input.pdb --opdbspecify the name of the output PDB file output.pdb --firstatomnumberspecify the desired serial number of the first atom of the output file 1000
If the first atom number is , it should be given as a decimal number (not in hybrid-36 code). However, numbers in the output PDB file will be written in hybrid-36 format.
As an alternative, one can provide a list of atoms numbers with one number per line in an auxiliary file as has been done with the following example.
plumed pdbrenumberModify atom numbers in a PDB, possibly using hybrid-36 coding More details --ipdbspecify the name of the input PDB file input.pdb --opdbspecify the name of the output PDB file output.pdb --atomnumbersspecify the desired serial numbers of the atoms of the output file using a separate list list.txt
The list.txt file that is used above might be something like this
120000
120001
120002
1
2
3
Numbers in the list should be provided as decimal numbers (not in hybrid-36 format).
However, numbers $>999994 in the output PDB file will be written in hybrid-36 mat.
Notice that there should be at least as many lines in list.txt as there atoms in the PDB file.
Additional lines in list.txt will just be ignored.
Syntax
The following table describes the command line options that are available for this tool
| Keyword | Description |
|---|---|
| --help/-h | print this help |
| --ipdb | specify the name of the input PDB file |
| --opdb | specify the name of the output PDB file |
| --firstatomnumber | specify the desired serial number of the first atom of the output file |
| --atomnumbers | specify the desired serial numbers of the atoms of the output file using a separate list |