I am currently working with a file for atomic distances in a protein. Distances are either within the same residue or between different residues. I am wondering if there is a way to sort/find all of the lines that contain distances in the same residue, so that I can easily copy these lines into a new file to work with separately. An example of the file is shown below, both for a distance within the same residue (164), and one with a distance between different residues (38, 124).
With sample input of:
assign (resid 164 and name CD ) (resid 164 and name CE ) 4.6 2.6 2.6 ! assign (resid 38 and name CE* ) (resid 124 and name CA ) 4.6 2.6 2.6 !
... the output should be:
assign (resid 164 and name CD ) (resid 164 and name CE ) 4.6 2.6 2.6 !
because the residues are the same between the two entries.