Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Molecular dynamics for teaching, learning, and playing



John,

"Awsome", coming from you, is the highest praise I could have
hoped for. Thank you!

As for the timing, I've been working on it since shortly after
the August AAPT meeting. Part of the inspiration was your
Interactive Physics presentation.

If your goal is to create stand-alone applications with nice
user-interfaces, then I'm convinced that REALbasic is the
way to go. Definitely take the time to get up that learning
curve. For me it took a couple of very intense days of
nonstop effort, followed by a longer period during which
I tried to get around the performance bottlenecks. During
the latter, I had much help from Joe Strout of Real Software.
But those initial two days were pretty lonely: trying to
ascertain from the documentation how to get a graphics
-intensive physics simulation to work at all. This was
my first experience with object-oriented programming, so
I didn't know the syntax (for instance) for drawing to
a window from a routine other than the Window's paint event
handler. Well, I eventually figured those things out,
and ended up writing a program that wasn't very object
oriented at all (aside from the GUI): put virtually all
the code into the "App" object, as if it were a plain old
program with a bunch of global variables ("properties")
and subroutines ("methods"). Whether that's the best way
to do it, I'm not sure, but it suits me just fine.

I actually started by writing a crude version of the program
in C (Mac-specific). Once I saw the possibilities, I decided
it needed a UI so I buckled down to learn RB. (Had Gould
and Tobochnik come through on their promise to produce chapters
of their new book based on Java by August, things might have
gone differently.) I created a RB version of the Ising
program first, since it's simpler. Then I got the Molecules
program mostly working, but before it was finished I got
diverted into learning some Java (finally), which was great
fun but I don't really recommend it if you need a GUI
(much better than C, though). I've decided that Java
is the way to go in something like a computational physics
course, but RB is far easier for creating stand-alone
applications. (The Java version of Molecules, though it
lacks a GUI, runs more than twice as fast as the RB version.)

Gosh, I'm long-winded, ain't I? Guess I'm just excited to
finally be releasing the program. Have fun!

Cheers,

Dan

This posting is the position of the writer, not that of SUNY-BSC, NAU or the AAPT.