haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
383 stars 113 forks source link

pdb_wc reporting also the chain IDs #12

Closed amjjbonvin closed 4 years ago

amjjbonvin commented 5 years ago

It would be useful next to the number of chains to also report the chain IDs in the output of pdb_wc

JoaoRodrigues commented 5 years ago

On it. Had a similar idea for something to list residue names in the file.

JoaoRodrigues commented 4 years ago

I gave it a thought and will try to take a shot at a way of doing this. The default mode of pdb_wc will generate just the report we have now, but using specific options e.g. pdb_wc -c will report more details on that selection.

JoaoRodrigues commented 4 years ago

@amjjbonvin what do you think of this usage syntax (see below). The default pdb_wc gives the same summary with numbers, but giving any option gives a more detailed summary. For instance, running pdb_wc -c gives the number and ids of chains in the file.

D:\Work\Code\pdb-tools (pdb_wc_improvement -> origin)
(swc) λ python pdbtools\pdb_wc.py tests\data\dummy.pdb
No. models:     1
No. chains:     4       (   4.0/model)
No. residues:   10      (  10.0/model)
No. atoms:      185     ( 185.0/model)
No. HETATM:     9
Multiple Occ.:  True
Res. Inserts:   False

D:\Work\Code\pdb-tools (pdb_wc_improvement -> origin)
(swc) λ python pdbtools\pdb_wc.py -c tests\data\dummy.pdb
No. chains:     4       (   4.0/model)
        ->      A,B,C,D

D:\Work\Code\pdb-tools (pdb_wc_improvement -> origin)
(swc) λ python pdbtools\pdb_wc.py -r tests\data\dummy.pdb
No. residues:   10      (  10.0/model)
        ->      ALA,ARG,ASN,DT,GLU,MET

D:\Work\Code\pdb-tools (pdb_wc_improvement -> origin)
(swc) λ python pdbtools\pdb_wc.py -rc tests\data\dummy.pdb
No. chains:     4       (   4.0/model)
        ->      A,B,C,D
No. residues:   10      (  10.0/model)
        ->      ALA,ARG,ASN,DT,GLU,MET
amjjbonvin commented 4 years ago

Nice!

JoaoRodrigues commented 4 years ago

Merged in #51