NAME
Chemistry::Bond::Find - Detect bonds in a molecule from atomic 3D coordinates
SYNOPSIS
use Chemistry::Bond::Find 'find_bonds';
find_bonds($mol, %options);
DESCRIPTION
Detects the bonds in a molecule from its 3D coordinates by using simple cutoffs. The current version does not guess the bond orders; all bonds will have a bond order of 1.
This module is part of the PerlMol project, http://www.perlmol.org/.
FUNCTIONS
- find_bonds($mol, %options)
-
Find and add the bonds in a molecule. Only use it in molecules that have no explicit bonds; for example, after reading a file with 3D coordinates but no bond orders.
Available options:
- tolerance
-
Defaults to 1.1. Two atoms are considered to be bound if the distance between them is less than the sum of their covalent radii multiplied by the tolerance.
- margin
-
NOTE: in general setting this option is not recommended, unless you know what you are doing. Used by the recursive partitioning algorithm when "stitching" the interfaces between partitions. It defaults to 2 * Rmax * tolerance, where Rmax is the largest covalent radius among the elements found in the molecule. For example, if a molecule has C, H, N, O, and I, Rmax = R(I) = 1.33, so the margin defaults to 2 * 1.33 * 1.1 = 2.926. This margin ensures that no bonds are missed by the partitioning algorithm. Using a smaller value gives faster results, but at the risk of missing some bonds. In this exaple, if you are certain that your molecule doesn't contain I-I bonds (but it has C-I bonds), you can set margin to (0.77 + 1.33) * 1.1 = 2.31 and you still won't miss any bonds. All this only has a real impact for molecules with a thousand atoms or more.
- min_atoms
-
Defaults to 20. Partitions with fewer that min_atoms will not be partitioned further, but their bonds will be found by a simple n^2 method. The default value seems to be optimal, but you can play with it if you want.
VERSION
0.05
SEE ALSO
Chemistry::Mol, Chemistry::Atom, Chemistry::Bond, http://www.perlmol.org/.
AUTHOR
Ivan Tubert <itub@cpan.org>
COPYRIGHT
Copyright (c) 2004 Ivan Tubert. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.