Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double Atom::averageBondLength(const Atom &atom) const {
- // See: http://www.wiredchemist.com/chemistry/data/bond_energies_lengths.html
- const double table[][5] = {
- // H C N O S
- {0.74, 1.09, 1.01, 0.96, 1.34}, // H
- {1.09, 1.54, 1.47, 1.43, 1.82}, // C
- {1.01, 1.47, 1.45, 1.40, 1.43}, // N
- {0.96, 1.43, 1.40, 1.48, 1.43}, // O
- {1.34, 1.82, 1.43, 1.43, 1.49}, // S
- };
- int i = numberToIndex(number);
- int j = numberToIndex(atom.number);
- if (i == -1 || j == -1) return 2; // a wild guess
- return table[i][j];
- }
Advertisement
Add Comment
Please, Sign In to add comment