# changing the chain id

3 posts / 0 new
changing the chain id
#1

Hi!

I need to change the chain ids for 10000 pdb structures generated by the relax protocol. I have 2 chains A and B in each protein (antibody) and I want to change them yo H and L (as antibody_H3 seems to request that the heavy chain of the antibody should be name d'H').  I saw in older posts that there should be an utility:

changeChain.pl - change the chain ID of a specified chain from a pdb file.

but I cannot find it the Rosetta source.

Any suggestions?

Many thanks,

Andrei

Post Situation:
Tue, 2018-01-09 00:08
aneamtu

I'm not familiar with the changeChain.pl utility, so I can't say where it's gone to. Frankly speaking, for something this straight-forward, I'd probably just use sed:

sed -i 's/^$ATOM.\{17\}$A/\1H/' *.pdb
sed -i 's/^$ATOM.\{17\}$B/\1L/' *.pdb

What that will do is an in-place (-i) substitution of ATOM lines with chain A (the chain letter is the 18th character after the ATOM designation) to chain H, and those with chain B to chain L. This should work, so long as you're only dealing with protein residues, and don't have any non-protein HETATM lines.  (I encourage you to look up some sed tutorials/manuals and understand what those lines are doing.)

If you're interested in doing more sophisticated manipulation, you may want to look at BioPython, BioPerl, etc.

Mon, 2018-01-15 14:20
rmoretti

Many thanks! It works just fine!

Thu, 2018-01-18 00:56
aneamtu