# Path: pdbtools/helper/geometry.py
# def dist(c1,c2=[0.,0.,0.]):
# def dist_sq(c1,c2=[0.,0.,0.]):
# def calcDistances(coord):
# def crossProduct(u,v):
# def dotProduct(u,v):
# def findAngle(u,v):
# def genRotMatrix(axis,theta):
# def arbRot(vector,axis,theta):
# def arbRotCoord(coord,axis,theta):
# def calcGlyCbeta(Ncoord,CAcoord,COcoord):
# def calcHXT(C_coord,O_coord,OXT_coord):
# def calcHG(CB_coord,SG_coord):
# def calcDihedrals(prevCO,currN,currCA,currCO,nextN,cutoff=6.5):
# def calcHN(prevCO,prevO,currN,currCA):
#     A = [prevCO[i] - currCA[i] for i in range(3)]
#     B = [currN[i] - currCA[i] for i in range(3)]
#     C = [currCO[i] - currCA[i] for i in range(3)]
#     D = [nextN[i] - currCA[i] for i in range(3)]
#     V1 = crossProduct(A,B)
#     V2 = crossProduct(C,B)
#     V3 = crossProduct(C,D)


import os, sys
from .helper import geometry
            continue

    # Create list of atoms for which to find number of cb atom neighbors.
    if calc_everything:
        compare_atoms = ["\"%s\"" % l[13:26] for l in pdb]
        compare_coord = [[float(l[30+i*8:38+i*8]) for i in range(3)]
                         for l in pdb]
    elif residue == None and atom == None:
        compare_atoms = cb_atoms[:]
        compare_coord = cb_coord[:]
    else:
        if residue != None:
            compare_list = [l for l in pdb if l[17:20] == residue]
        else:
            compare_list = pdb[:]
        if atom != None:
            compare_list = [l for l in compare_list if l[13:16].strip() == atom]

        compare_atoms = ["\"%s\"" % l[13:26] for l in compare_list]
        compare_coord = [[float(l[30+i*8:38+i*8]) for i in range(3)]
                         for l in compare_list]

    # Calculate array of distances between each coordinate
    num_compare = len(compare_coord)
    num_cb = len(cb_coord)

    dist_array = [[0. for j in range(num_cb)]
                  for i in range(num_compare)]
    for i in range(num_compare):
        for j in range(num_cb):

# Path: pdbtools/helper/geometry.py
# def dist(c1,c2=[0.,0.,0.]):
# def dist_sq(c1,c2=[0.,0.,0.]):
# def calcDistances(coord):
# def crossProduct(u,v):
# def dotProduct(u,v):
# def findAngle(u,v):
# def genRotMatrix(axis,theta):
# def arbRot(vector,axis,theta):
# def arbRotCoord(coord,axis,theta):
# def calcGlyCbeta(Ncoord,CAcoord,COcoord):
# def calcHXT(C_coord,O_coord,OXT_coord):
# def calcHG(CB_coord,SG_coord):
# def calcDihedrals(prevCO,currN,currCA,currCO,nextN,cutoff=6.5):
# def calcHN(prevCO,prevO,currN,currCA):
#     A = [prevCO[i] - currCA[i] for i in range(3)]
#     B = [currN[i] - currCA[i] for i in range(3)]
#     C = [currCO[i] - currCA[i] for i in range(3)]
#     D = [nextN[i] - currCA[i] for i in range(3)]
#     V1 = crossProduct(A,B)
#     V2 = crossProduct(C,B)
#     V3 = crossProduct(C,D)


# Path: pdbtools/neighbors.py
import os, sys
from .helper import geometry

            continue

    # Create list of atoms for which to find number of cb atom neighbors.
    if calc_everything:
        compare_atoms = ["\"%s\"" % l[13:26] for l in pdb]
        compare_coord = [[float(l[30+i*8:38+i*8]) for i in range(3)]
                         for l in pdb]
    elif residue == None and atom == None:
        compare_atoms = cb_atoms[:]
        compare_coord = cb_coord[:]
    else:
        if residue != None:
            compare_list = [l for l in pdb if l[17:20] == residue]
        else:
            compare_list = pdb[:]
        if atom != None:
            compare_list = [l for l in compare_list if l[13:16].strip() == atom]

        compare_atoms = ["\"%s\"" % l[13:26] for l in compare_list]
        compare_coord = [[float(l[30+i*8:38+i*8]) for i in range(3)]
                         for l in compare_list]

    # Calculate array of distances between each coordinate
    num_compare = len(compare_coord)
    num_cb = len(cb_coord)

    dist_array = [[0. for j in range(num_cb)]
                  for i in range(num_compare)]
    for i in range(num_compare):
        for j in range(num_cb):

            dist_array[i][j] = geometry.dist(compare_coord[i],cb_coord[j])