Freelance Writing Jobs | Today's Articles | Sign In

 
Browse Sections

Object-Oriented Chemistry


We've spent the last few weeks building a general overview of object-oriented software design technologies and a little more specific look at some of Java's features. As we continue on our path toward examining some of the Java-based chemistry software now available, this week we'll take a look at how object-oriented software development might be applied to chemistry codes in general.

You'll recall that the central idea behind object-oriented programming is to represent items in some way that is analogous to what you find in the real world. To represent a bird, then, you'd have to specify the properties of the bird, such as beak length, egg color, feather softness, etc., as well as the actions that pertain to a bird : flying, eating, nesting, and on and on. Given this framework, it's not too difficult to come up with some objects that might be used in chemistry.

If we start at the subatomic level, which is akin to setting up a quantum chemical simulation, we might choose as our basic object the atom. The atom would have as properties the number of electrons, protons, and neutrons it contains, its valence electrons, and its natural isotope abundancies, among others. Many properties we traditionally associate with atoms, such as mass, could be easily derived from the properties listed above. The methods, or actions, associated with an atom would include bonding to other atoms, losing electrons, and anything else an atom can do.

Having established the base object, the atom, the setup starts to get interesting and pretty fun, too. We can quickly define a molecule as an object which contains a certain number of atoms as we have already defined them. This obviously cuts down the work we have to do, as we don't have to redefine what an atom is each time we use one in a molecule. Of course, molecules will have properties that atoms don't, such as the number of bonds, bends, and torsions in the species, the types of bonds present, its chemical reactivity, and any number of other traits. Some of the actions specific to a molecule are bond breaking, bond bending, bond stretching, and reacting with another molecule.

Once the basic model of a molecule is established, it can be subclassed to make amino acids, DNA, proteins, or any other molecule you can think of. All of these will inherit the basic traits and methods of the original molecule class, and they will enhance it with properties and actions of their own. From here, molecules can be linked together to form systems, and so forth.

As illustrated above, object-oriented technology seems to

The copyright of the article Object-Oriented Chemistry in Scientific Computing is owned by Adam Hughes. Permission to republish Object-Oriented Chemistry in print or online must be granted by the author in writing.

Go To Page: 1 2

Articles in this Topic    Discussions in this Topic

;