示例#1
0
def get_axis_anchor(residue, i_chi):
    """
  Returns the axis of rotation and an anchor point of i_chi
  dihedral of residue.
  """
    res_chi_topology = data.get_res_chi_topology(residue.type)
    p = [residue.atom(a).pos for a in res_chi_topology[i_chi]]
    axis = p[2] - p[1]
    anchor = p[2]
    return axis, anchor
示例#2
0
def calculate_chi(residue, i_chi):
    """
  Returns the angle for the i_chi dihedral angle of residue.
  """
    res_chi_topology = data.get_res_chi_topology(residue.type)
    if i_chi < len(res_chi_topology):
        atom_types = res_chi_topology[i_chi]
        crds = [residue.atom(t).pos for t in atom_types]
        return v3.normalize_angle(v3.dihedral(*crds))
    raise ValueError, "No Chi%d angle for residue %d" % (i_chi, i)
示例#3
0
def get_axis_anchor(residue, i_chi):
  """
  Returns the axis of rotation and an anchor point of i_chi
  dihedral of residue.
  """
  res_chi_topology = data.get_res_chi_topology(residue.type)
  p = [residue.atom(a).pos for a in res_chi_topology[i_chi]]
  axis = p[2] - p[1]
  anchor = p[2]
  return axis, anchor
示例#4
0
def calculate_chi(residue, i_chi):
  """
  Returns the angle for the i_chi dihedral angle of residue.
  """
  res_chi_topology = data.get_res_chi_topology(residue.type)
  if i_chi < len(res_chi_topology):
    atom_types = res_chi_topology[i_chi]
    crds = [residue.atom(t).pos for t in atom_types]
    return v3.normalize_angle(v3.dihedral(*crds))
  raise ValueError, "No Chi%d angle for residue %d" % (i_chi, i)
示例#5
0
def get_n_chi(residue):
    """
  Returns the number of chi angles of residue.
  """
    return len(data.get_res_chi_topology(residue.type))
示例#6
0
def get_n_chi(residue):
  """
  Returns the number of chi angles of residue.
  """
  return len(data.get_res_chi_topology(residue.type))