def parse_domain(str):
 m = _domain_re.match(str)
 if (not m):
  raise ValueError(('Domain: ' + str))
 dom = Domain()
 dom.sid = m.group(1)
 dom.sccs = m.group(2)
 dom.residues = Residues.Residues(m.group(3))
 if (not dom.residues.pdbid):
  dom.residues.pdbid = dom.sid[1:5]
 dom.description = m.group(4).strip()
 return dom

def parse_domain ( str ) : m = _domain_re . match ( str ) if ( not m ) : raise ValueError ( ( 'Domain: ' + str ) ) dom = Domain ( ) dom . sid = m . group ( 1 ) dom . sccs = m . group ( 2 ) dom . residues = Residues . Residues ( m . group ( 3 ) ) if ( not dom . residues . pdbid ) : dom . residues . pdbid = dom . sid [ 1 : 5 ] dom . description = m . group ( 4 ) . strip ( ) return dom
convert an astral header string into a scop domain .