Example #1
0
def find_ca_of_resname(atoms, resname):
  for atom in atoms:
    if pdbatoms.split_tag(resname) == \
       (atom.chain_id, atom.res_num, atom.res_insert):
      if "CA" == atom.type:
        return atom
  raise IndexError, "Can't find atom %s" % resname
Example #2
0
def find_ca_of_resname(atoms, resname):
    for atom in atoms:
        if pdbatoms.split_tag(resname) == \
           (atom.chain_id, atom.res_num, atom.res_insert):
            if "CA" == atom.type:
                return atom
    raise IndexError, "Can't find atom %s" % resname
Example #3
0
def pymol_id_from_res_tag(tag):
  chain_id, res_num, insert = pdbatoms.split_tag(tag)
  if chain_id == " ":
    return "resi %d" % res_num
  else:
    return "(chain %s and resi %d%s)" % (chain_id, res_num, insert)