def _process_residue(self, selection, name=None):
if name is None:<EOL><INDENT>name = selection.replace('<STR_LIT::>', '<STR_LIT:_>')<EOL><DEDENT>m = self.RESIDUE.match(selection)<EOL>if not m:<EOL><INDENT>raise ValueError("<STR_LIT>".format(**vars()))<EOL><DEDENT>gmx_resid = self.gmx_resid(int(m.group('<STR_LIT>')))<EOL>residue = m.group('<STR_LIT>')<EOL>if len(residue) == <NUM_LIT:1>:<EOL><INDENT>gmx_resname = utilities.convert_aa_code(residue) <EOL><DEDENT>else:<EOL><INDENT>gmx_resname = residue                            <EOL><DEDENT>gmx_atomname = m.group('<STR_LIT>')<EOL>if gmx_atomname is None:<EOL><INDENT>gmx_atomname = '<STR_LIT>'<EOL><DEDENT>_selection = '<STR_LIT>'.format(**vars())<EOL>cmd = ['<STR_LIT>', '<STR_LIT>',<EOL>_selection,<EOL>'<STR_LIT>'.format(**vars()),<EOL>'<STR_LIT:q>']<EOL>fd, ndx = tempfile.mkstemp(suffix='<STR_LIT>', prefix=name+'<STR_LIT>')<EOL>rc,out,err = self.make_ndx(n=self.ndx, o=ndx, input=cmd)<EOL>self.check_output(out, "<STR_LIT>"<EOL>"<STR_LIT>" % vars())<EOL>return name, ndx<EOL>
Process residue/atom selection and return name and temp index file.