NanoCAD, a freeware nanotech design system in Java
A freeware nanotech design system
including source code
If you have a Java-capable web browser, the NanoCAD applet should appear
below. If you don't, you may find this page rather boring.
This is a big applet, so it may take one or two minutes to load into your
browser (sorry for the delay).
If you see a
molecule below, you can try rotating the molecule in various directions
by dragging your mouse on the gray background (be sure to hold down the
mouse button while you do that). See the text window for other tricks.
Send suggestions, comments or questions to
NanoCAD uses mathematical techniques of molecular modeling to simulate
the behavior of molecules on your web browser. The "Emin" buttons perform
energy minimization, that is, they try to nudge the molecule toward a
more natural shape where its potential energy will be lower. Real
molecules jiggle around their minimal-energy shapes due to thermal
NanoCAD was largely inspired by the book
Unbounding the Future, in which the
describes a virtual-reality simulation of the molecular-scale world. This
simulation is used as a design tool by future students of
For the present, the description is science fiction. I would like to think
that NanoCAD may contribute some day to making it real.
Up to now,
previous versions of
NanoCAD have been written in either Scheme or Common Lisp. This has
proved inconvenient for a lot of people, so this Java version should make
NanoCAD available to folks who had trouble with it in the past. The
earlier versions have been distributed under the somewhat restrictive
GNU General Public License, but I'm switching to a more commerce-friendly
Berkeley-esque license. Don't worry, it's still free software.
Scary Science Stuff
The most complete and complex (and computation-intensive) chemistry
simulators find complete solutions to Schrodinger's wave equation,
solving for exact shapes of electron clouds and other horribly messy
things. At that level, "chemical bonds" are emergent phenomena and are
not a-priori built into the simulation. A few terms for chemistry
simulators, in decreasing order of sophistocation, are: ab initio
(where you start with just Schrodinger's wave equation and a few
fundamental constants, and derive everything else from scratch),
semi-empirical (modelling systems that depend partially on empirically
gathered data), and molecular mechanics (depending entirely on empirical
data to make up mass-and-spring mechanical models of molecular
Nanotechnology (for the moment, at least) most strongly resembles
mechanical engineering. I'm hoping to come up with something simple and
practical that would not overburden a desktop PC. I have therefore chosen
to stick to molecular mechanics, which I think will serve most of the
near-term needs of nanotechnology development.
I was never a very good chemistry student in school, so I've had to do a
little reading. For thinking about this stuff, it's useful to know a bit
about how atomic bonds work. I can recommend Linus Pauling's book, "The
Nature of the Chemical Bond".
The mathematical model of molecular mechanics used by NanoCAD, called MM2,
was developed by Norman Allinger of the University of Georgia. MM2
is described in Eric Drexler's book "Nanosystems", starting on page 44.
MM2 essentially treats a group of atoms as a collection of masses, non-linear
springs, torsion bars, and so on. The NIH has a
very pretty summary of the ideas behind modelling molecular
mechanics. Based on the MM2 info in Nanosystems, I've computed some typical
spring constants that you might expect to
see in some typical molecules.
A couple of people have written to say that they had trouble running the
NanoCAD applet under MS Windows, getting a message like this: The dynamic
link library sc10awt.dll is not in my paths. This is not a problem with
NanoCAD, this is a problem with how your web browser is set up. If
you run into this, try to find a technical support phone number for whoever
made your browser (Netscape, or if you're using Internet Explorer, Microsoft)
and ask them for help in configuring your browser to run Java applets
How about something more like Virtual Reality?
Since NanoCAD was inspired in part by the virtual reality program described in
Unbounding the Future, it's reasonable to ask whether we can expect to
see a VR version of NanoCAD any time soon. And indeed, there is hope.
Around 1983, I visited Atari's research lab in Cambridge Massachusetts, and
got the opportunity to try a force-feedback joystick. A normal joystick feeds
X and Y coordinates to the computer, which say how far up or down the stick
is, and how far left or right it is. The force-feedback joystick also had
motors which allowed the computer to push against your hand. When it was
programmed correctly, it gave an incredibly realistic sensation of pushing
against a spring, or navigating a maze with solid walls. The sense of realism
There is now a force feedback joystick available in the $90-$100 range, and
I've put together a little
about it. One of these days, I mean to actually buy one, and see if it can
be programmed to give the physical feeling of tugging on atoms and molecules.
Then you'd be able to see how a molecule deforms as you shake it or stretch
Archives and precompiled executables
Click on these files with your right mouse button to download them.
- Source file archives, these contain all the source files and compiled
- nanocad.exe is a Windows executable
- wrapper.java, a class that turns the NanoCAD
applet into a Java application
- nanocad.java, the NanoCAD applet
- atom.java, definition of an atom. The following
elements are subclasses of the atom class:
- bond.java, definition of a chemical bond
- dlentry.java, an entry in a drawing list. The
following are subclasses of the dlentry class:
- group.java, a group of atoms and bonds, with
various useful group-wise operators. The following predefined
structures are subclasses of the group class:
- view.java, defines a point of view, with
conversions between physical locations and screen coordinates
- term.java, defines MM2-style energy terms, used
to compute approximations of interatomic forces. The following are
subclasses of the term class:
- lterm.java, a bond-length term
- aterm.java, a bond-angle term
- tterm.java, a torsion-angle term
- lrterm.java, a long-range term
(electrostatic and van-der-Waals forces). As of this writing,
these are not implemented yet.
Things to Do in the Future
- Electrostatics forces need to be implemented. When two atoms of
differing electronegativies are connected by a covalent bond, the
bond has an electric dipole moment; this hasn't been implemented
- I discovered a problem with how torsion forces were computed. This has
been fixed, by using the torsion expression from another program
- It should be possible to read PDB or XYZ files, and write VRML files.
- Add more elements, and maybe more predefined structures. This is a lot
less painful than it was in Scheme, thanks to the OOP approach and
a couple of Perl scripts.
- It would be nice to be able to select a group of atoms and be able to
cut, copy, paste, and move them. Maybe there should be some sort of
clipboard for "structure scraps".
- The wrapper.java application has some stubs for reading and writing
structure files, but they don't do anything yet. It would be really
nice to be able to read in PDB files. It would be especially nice to
be able to import structures directly from repositories like the
Brookhaven Protein Data Bank.
NanoCAD mailing list
There is a mailing list available for anyone interested in discussion
of NanoCAD or related topics. To subscribe, send a message to
firstname.lastname@example.org with the line "subscribe nanocad" in
the body (not the subject) of the message. You may then send email
to everyone on the list by sending it to email@example.com.
As of this writing (4 Jan 98) there are about 50 people on the list.
I welcome discussion of possible future features or directions for
NanoCAD. I'm not interested in suggestions about what people think I
should work on (NanoCAD has been, and remains, a volunteer effort,
and my spare time is scarce). I'm much more interested in what others
are willing to do with it, which is why I've posted the source code.
Before you send me mail about what you think I should do, read the
source code yourself and pick up a copy of the Java Development Kit,
and if you need to read some Java books, I can recommend the books
published by O'Reilly. Either that, or take a swing at translating
the current Java version to C++.
Chemistry Tutorials, Modeling Kits, etc...
If I'm typical (and in my experience, I am), the people who develop an
interest in nanotechnology tend to be software types who don't know a heck
of a lot about chemistry. Alas, chemistry is a central part of nanotechnology.
But software types usually have web access, so what we need are on-line
These folks in New Hampshire
make some pretty nice, inexpensive plastic modeling kits for building
molecules in something more tangible than graphics on a computer screen.
They also have another on-line
chemistry tutorial. If I can find some information on other molecular
modeling kits, I'll post that here as well. The New Hampshire folks don't like
ball-and-stick models, but I find that sometimes they make the geometry of
a molecule more obvious.
Some Nanotechnology-Related Links
This page has been mentioned in
the Foresight Update!
Here is a really
fantastic animation of a molecule undergoing thermal vibration, by Horst
Vollhardt of the Department of Physical Chemistry, at Darmstadt University
of Technology in Germany. It doesn't allow you to modify the structure, but
it does a beautiful job with the molecular dynamics.
Lee Moon has
ported NanoCAD to the Apple Newton. It looks like he's offering it as a
3D drawing program only, without any molecular modeling. But it's kinda
cool to think you could run it on a palmtop. If anybody wants to port it
to the USR Palm Pilot, with modeling intact, I'd really like to see that.
Ralph Merkle has written
concise introduction to the ideas of nanotechnology.
The folks at the Foresight Institute have thought long and hard about
how to make the web a more flexible place for discussion. They have
recently developed a series of tools for critical discussion, hosted
at crit.org. Their software allows you
to annotate a document without the author's permission (since the
annotations themselves reside on the crit.org server, not the author's
server). Ka-Ping Yee has done an excellent job on the CritLink tool.
If you would like to try annotating this very web page, visit
There is also the idea of
coarse backlinks implemented by sending tricky commands to search
engines, like this:
Lots of people have contributed to NanoCAD in lots of different ways
over the past couple of
years. (Some of these people have perhaps never heard of NanoCAD, but
they have my gratitude anyway.) They are:
and the members of the M.I.T. Nanotechnology Study Group. Thanks, everybody.