CCL Home Page
Up Directory CCL README
NanoCAD version 0.22
(c) 1996,1997 Will Ware
GNU General Public License and all that
tested on Win95, Linux, and SunOS

Some while back, Markus Krummenacker commented that he'd like to see
NanoCAD be made available in Common Lisp. This has also been something
I've been interested in. The result of puttering with this is version
0.22, which works both in Common Lisp and in MzScheme/MrEd. This is
made possible by a set of macros that define a sort of intersection
language, which looks mostly Scheme-ish.

There is an example in 'hackv.scm' that does a little molecular
dynamics problem. To try it, type:

echo '(load "nc.lsp")(load "hackv.scm")(g)' | gcl
or
echo '(load "nc.lsp")(load "hackv.scm")(g)' | clisp
or
echo '(load "nc.scm")(load "hackv.scm")(g)' | mzscheme

You can still run NanoCAD with the MrEd GUI, by starting up MrEd and
loading the file "ncm.scm".

GCL seems to lose pretty big compared to MzScheme as far as performance.
CLISP does better, but not as well as MzScheme. I haven't tried this
stuff on a non-free Common Lisp.

Several changes in and around 'setup-terms':
* Darius Bacon proposed a change that would make it vastly more efficient
for large structures (all the stuff to do with 'chains').
* The change makes the code much easier to read.
* I got a chance to look more carefully at the NIH molecular mechanics web
page, and now I see where electrostatic terms should be introduced. I also
found I had been using too many van der Waals terms.

---- Yet more changes to make ----

* Electrostatics: at setup-terms time, divide the electric dipole moment
	for each bond by the ideal bond length, this gives a fractional
	charge to be added to those two atoms. Use those, plus any integer
	charge due to ionization, to figure electrostatic interactions.
* Now that the silly thing runs in Common Lisp, it would be interesting
	to use the lisp2wish hack to do graphics from CLISP (use the
	'run-program' function)
* Think about doing animations in batch mode, and producing some kind of
	data structure, that can be run quickly in the structure window,
	or exported/translated into a Tcl program to show the animation
	quickly. It should be possible, in both the structure window and
	the Tcl program, to use the mouse to rotate the structure as it's
	moving.
* Be able to import and export PDB files, and the file format used by the
	Molecular Arts program. In some ways, that's a preferable way to
	build structures over the one in NanoCAD.
* One of these days, get those torsion forces working again.

---- Acknowledgements ----

* People with interesting and useful suggestions: Darius Bacon, Eric
	Drexler Markus Krummenacker, Will Dye, Dejan Vucinic, Konrad
	Hinsen, Thomas Marsh
* People who've contributed NanoCAD extensions: Michael Deutschmann
* People in the Scheme world: Matthew Flatt, Erick Gallesio
* People who came up with the science: Eric Drexler, Norman Allinger
* People whose software inspired me: Roger Sayle, Jay Ponder, whoever
	wrote Babel, the folks at Molecular Arts



---- README FILE FOR VERSION 0.21 ----

NanoCAD version 0.21
(c) 1996,1997 Will Ware
GNU General Public License and all that
tested on Win95, Linux, and SunOS

A lot of things are different in this version.

* The control panel and drawing/viewing canvas come up in separate windows,
	and the MrEd console stays up. This gives the user more freedom to
	configure his screen the way he wants, and lets him type to the
	Scheme interpreter when he wants.

* The code has been made MUCH more readable by using an object-oriented
	approach to data structures, instead of picking things out with
	hairy combinations of 'car' and 'cdr'. Elements, species, and
	hybridization are handled much more cleanly. This will make it
	much easier for the user to understand and modify the code, and
	it will be easier to add more elements, when I get around to
	doing that.

* Force calculations have been made faster by changing the format of the
	term list; terms are now functions with no arguments. 'list-ref'
	is now done only during setup-terms, which runs very infrequently.
	Calculations have also been sped up by precalculating all difference
	vectors and distances for all pairs of atoms. If this isn't done in
	advance, the same work would be done many times by the terms.

* Source files split up along functional lines. A GUI-less version of
	NanoCAD can now be used in MzScheme, and perhaps other Scheme
	implementations (I've only tried MzScheme).

* Regrettably, for the moment, torsion forces don't work.

Things to add in the future: more elements, ionization, electronegativity,
electrostatics, animation. These should all be much easier to do now that
the code has been so thoroughly cleaned up.

You can now use NanoCAD without the overhead of the MrEd GUI system if you
like. The same group that wrote MrEd also wrote a Scheme interpreter without
GUI support, called MzScheme, and if you load NanoCAD into MzScheme, you can
use all the computational stuff, and export XYZ files for viewing in RasMol.

The primary motivation in this version of NanoCAD is to open it up for
extension and scripting. The file 'test.scm' demonstrates some examples of
how to use NanoCAD without a GUI, by calling routines from the NanoCAD
source files.

In either MrEd or MzScheme, type:

	(load "test.scm")

(assuming the directories are OK) and everything should be copacetic.
Modified: Sat Mar 1 17:00:00 1997 GMT
Page accessed 4473 times since Sat Apr 17 22:31:18 1999 GMT