| Chemistry::Bond(3pm) | User Contributed Perl Documentation | Chemistry::Bond(3pm) |
Chemistry::Bond - Chemical bonds as objects in molecules
use Chemistry::Bond;
# assuming we have molecule $mol with atoms $a1 and $a2
$bond = Chemistry::Bond->new(
id => "b1",
type => '=',
atoms => [$a1, $a2]
order => '2',
);
$mol->add_bond($bond);
# simpler way of doing the same:
$mol->new_bond(
id => "b1",
type => '=',
atoms => [$a1, $a2]
order => '2',
);
This module includes objects to describe chemical bonds. A bond is defined as a list of atoms (typically two), with some associated properties.
In addition to common attributes such as id, name, and type, bonds have the order attribute. The bond order is a number, typically the integer 1, 2, 3, or 4.
<https://github.com/perlmol/Chemistry-Mol>
Chemistry::Mol, Chemistry::Atom, Chemistry::Tutorial
Ivan Tubert-Brohman <itub@cpan.org>
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 2022-07-14 | perl v5.34.0 |