I am not scanning against PDB95 but rather working on multi-chain PDBs locally.
For instance, if a PDB has 4 chains (say A, D, F, P) and I am interested in extracting the chain ID of the second segment (D) that best aligns with my query sequence, I do not believe you can extract that from PIR alignment file, which only provides chain IDs of the first (A) and the last chain (P).
Also, how would I know if my query sequence aligned up against chain D unless I look at the alignment file manually. I want to automate this procedure. In other words, have a python script extract the chain ID of the aligned segment in a multi-chain PDB and automatically proceed to next step for homology modeling--that is I only want to use segment D as a template during homology modeling rather than the whole multi-chain PDB, which compromises the quality of the alignment and hence the model.