File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,13 +75,18 @@ def _check_chain_and_segid(mol, verbose):
7575 chainatoms = np .where (mol .chain == c )[0 ]
7676 firstatom = chainatoms [0 ]
7777 lastatom = chainatoms [- 1 ]
78- print (f"Chain { c } :" )
79- print (
80- f" First residue: { _fmt_res (mol .resname [firstatom ], mol .resid [firstatom ], mol .insertion [firstatom ])} "
78+ firstres = _fmt_res (
79+ mol .resname [firstatom ], mol .resid [firstatom ], mol .insertion [firstatom ]
8180 )
82- print (
83- f" Final residue: { _fmt_res ( mol .resname [lastatom ], mol .resid [lastatom ], mol .insertion [lastatom ]) } "
81+ lastres = _fmt_res (
82+ mol .resname [lastatom ], mol .resid [lastatom ], mol .insertion [lastatom ]
8483 )
84+ print (f"Chain { c } :" )
85+ if firstres == lastres :
86+ print (f" { 'residue:' :>14} { firstres } " )
87+ else :
88+ print (f" { 'First residue:' :<16} { firstres } " )
89+ print (f" { 'Final residue:' :<16} { lastres } " )
8590 print ("---- End of chain report ----\n " )
8691
8792 return mol
You can’t perform that action at this time.
0 commit comments