#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* -------------------------------------------------------------------
#G* Please see the accompanying LICENSE file for further information.
#H* -------------------------------------------------------------------
#I* Additional authors of this source file include:
#-*
#-*
#-*
#Z* -------------------------------------------------------------------

# bond lengths and other information useful for simply building atoms
#
#

length = {
    ( 'C3', 'H1') : 1.0900,
    ( 'C2', 'H1') : 1.0800,
    ( 'C1', 'H1') : 1.0560,
    ( 'H1', 'S1') : 1.3360,
    ( 'H3', 'NA') : 1.5999,
    ( 'H2', 'O3') : 0.9600,
    ( 'H3', 'N2') : 1.0100,
    ( 'H3', 'N3') : 1.0100,
    ( 'H4', 'N4') : 1.0100,
    ( 'H4', 'N5') : 1.0100,
    ( 'CA', 'CD') : 1.6999,
    ( '00', 'Du') : 0.5000,
    ( '00', 'Du') : 3.0000,
    ( 'Br', 'C1') : 1.7900,
    ( 'Br', 'C2') : 1.8900,
    ( 'Br', 'C3') : 1.9490,
    ( 'Br', 'OM') : 1.5000,
    ( 'Br', 'O2') : 1.5000,
    ( 'C1', 'C1') : 1.2060,
    ( 'C1', 'N1') : 1.1640,
    ( 'C1', 'C2') : 1.4000,
    ( 'C1', 'C3') : 1.4450,
    ( 'C1', 'Cl') : 1.6400,
    ( 'C1', 'F0') : 1.2700,
    ( 'C1', 'I0') : 1.9900,
    ( 'C1', 'O3') : 1.3300,
    ( 'C1', 'OA') : 1.3300,
    ( 'C1', 'C1') : 1.3000,
    ( 'C1', 'C2') : 1.3130,
    ( 'C1', 'O2') : 1.1610,
    ( 'C1', 'S1') : 1.5600,
    ( 'C2', 'N2') : 1.3800,
    ( 'C2', 'N4') : 1.3500,
    ( 'C2', 'C2') : 1.4630,
    ( 'C2', 'C3') : 1.5220,
    ( 'C2', 'Cl') : 1.7300,
    ( 'C2', 'F0') : 1.3330,
    ( 'C2', 'I0') : 2.1000,
    ( 'C2', 'N2') : 1.4200,
    ( 'C2', 'O3') : 1.3640,
    ( 'C2', 'OA') : 1.3640,
    ( 'C2', 'OM') : 1.2200,
    ( 'C2', 'S1') : 1.7200,
    ( 'C2', 'SM') : 1.7500,
    ( 'C2', 'Si') : 1.8650,
    ( 'C2', 'C2') : 1.3370,
    ( 'C2', 'N2') : 1.2800,
    ( 'C2', 'O2') : 1.2200,
    ( 'C2', 'S1') : 1.6000,
    ( 'C3', 'C2') : 1.5220,
    ( 'C3', 'C3') : 1.5260,
    ( 'C3', 'Cl') : 1.7950,
    ( 'C3', 'F0') : 1.3800,
    ( 'C3', 'I0') : 2.1490,
    ( 'C3', 'N2') : 1.4490,
    ( 'C3', 'N3') : 1.4710,
    ( 'C3', 'NB') : 1.4710,
    ( 'C3', 'N4') : 1.4490,
    ( 'C3', 'N5') : 1.4710,
    ( 'C3', 'O3') : 1.4100,
    ( 'C3', 'OA') : 1.4100,
    ( 'C3', 'OM') : 1.4100,
    ( 'C3', 'SA') : 1.8100,
    ( 'C3', 'S1') : 1.8100,
    ( 'C3', 'SM') : 1.8340,
    ( 'C3', 'Si') : 1.8800,
    ( 'Cl', 'OM') : 1.4200,
    ( 'Cl', 'O2') : 1.4200,
    ( 'F0', 'N3') : 1.4200,
    ( 'F0', 'P0') : 1.5600,
    ( 'I0', 'OM') : 1.6500,
    ( 'I0', 'O2') : 1.6500,
    ( 'Lp', 'N3') : 0.8000,
    ( 'Lp', 'S1') : 0.6790,
    ( 'Lp', 'O3') : 0.6000,
    ( 'N2', 'N2') : 1.2700,
    ( 'N2', 'N3') : 1.3000,
    ( 'N2', 'O3') : 1.4000,
    ( 'N2', 'P0') : 1.7400,
    ( 'N2', 'Z0') : 2.0500,
    ( 'N3', 'N3') : 1.3810,
    ( 'N3', 'O3') : 1.4800,
    ( 'N4', 'OM') : 1.2000,
    ( 'N4', 'O2') : 1.2000,
    ( 'O2', 'O2') : 1.2070,
    ( 'O2', 'P0') : 1.4800,
    ( 'O2', 'S1') : 1.4800,
    ( 'O3', 'P0') : 1.6100,
    ( 'O3', 'S1') : 1.3460,
    ( 'O3', 'Si') : 1.6450,
    ( 'OM', 'P0') : 1.4800,
    ( 'OM', 'S1') : 1.4500,
    ( 'S1', 'S1') : 2.0380,
    ( '00', 'H0') : 1.1000,
    ( '00', 'OA') : 1.4100,
    ( '00', 'NB') : 1.4100,
    ( '00', 'SA') : 1.8100,
    ( 'Ge', '00') : 2.1000,
    ( '00', '00') : 1.5000,
}

for a in list(length.keys()):
    length[(a[1],a[0])]=length[a]

# below are inmcomplete (as is the underlying implementation, hehe )

nonlinear = {

    'O3' : 1,
    'OH' : 1,
    'OW' : 1,
    'O0' : 1,
    'S1' : 1,
    'S0' : 1,
    '' : 1,
    '' : 1,
    '' : 1,
    '' : 1,
    }

tetrahedral = {
    'C3' : 1,
    'C0' : 1,
    'OQ' : 1,
    'N3' : 1,
    'N5' : 1,
    'N0' : 1,
    'P0' : 1,
    'B3' : 1,
    'Si' : 1,
    }

planer = {
    'C2' : 1,
    'CP' : 1,
    'CM' : 1, # ?
    'CR' : 1, # ?
    'O2' : 1,
    'OM' : 1,
    'OP' : 1,
    'N2' : 1,
    'N4' : 1,
    'B2' : 1,
    '' : 1,
    '' : 1,
    '' : 1,


    'O2' : 1,
}
