CURRENT
-------

URGENT - core dump if load surface - delete some atoms - then 
attempt to create periodic images.

When creating periodic images - eliminate redundancy for greater speed.
eg if we've already got a 2x1 and user incs to 2x2 -> currently recreate
everything from the base unit instead of just doubling the current 2x1
configuration.


The crashes I had before with some handlers needing GtkWidget *w, before
the passed data pointer are due to the fact that I didn't know the
difference between gtk_signal_connect() and gtk_signal_connect_object() DOH!

Added vibrational lists to atom_pak's data. These are not freed
when the atom is deleted - another memory leak which is hard to
avoid without rewriting the atom storage code to be more amenable
to adding and deleting eg linked lists

Instead of doing a costly get_elem_data(), each atom has a pointer to
the relevant (global/local) static elem_pak to use for this atom.

Update the gdisrc reading/writing to remember more stuff.

The distinctions between init_core/elem_seek etc. need to be
made clearer. In particular, elem_seek restores bond radius
and colour values for all atoms - but nothing else - this is
not very intuitive.

Long range:
Group all non atom/bond stuff in generic object listing.
One dialog (with list display) for Measurements, ribbons,
planes & vectors, system (axes/unit cell etc.) accessed
via the notebook/page mechanism.

The new ribbon code (and other new geom stuff) will have routines
for doing stuff like, project a vector onto a plane etc. The geom
measurement routines could make use of these.

Do a new dialog for the move atoms between regions? This would include
more complex operations such as find_best : from (selected)(depth) -
which would scan all possible sequences for the best possible surface
configuration. Use Esurf as the factor to minimize. Conseq., the (110) 
surface of gibbsite could be easily corrected. Also put in the options
(currently in the creator) to swap the regions of a selection manually.

opengl DRAW SHELLS - hemi-sphere maybe???

In the GULP dialog (under misc?) have an option to delete/keep input
and output files in any job.

GDIS now automatically distiguishes rhombo & hex type cells, but
only if spacename is specified (searches for 'R'). Need to be 
able to do the same for space number (ie find the range)

Why is gibbsite (gibb_opt.res) not giving the 0.25 shift any more???
(it gives two equivalent shifts either side of it, so the result is
the same - just not as nice).

SOF entry for shells. (what about when one shell is near multiple cores?)

Fix display dialog overlay combo selection when basenames are identical.

Use the A2D & D2A definitions for angle/rad conversions.

In energetics dialog, default potential library should be <none>
maybe a directory listing to use some arbitrary library? Or even
a combo box to use (gdis included ie published/freely available)
sets like in the Bush paper.

Fix the occasional missing (bad adj?) errors in morphology drawing.

Aim for introduction of a job processing thread (gthreads).
Or maybe not... fork() penalty (memory copy) only occurs
if something is *changed* in memory.
approach - mutex locking in model_ptr() (OR call type with READ/WRITE)
allow multiple READs, but only allow a WRITE to occur on its own.

command line option in gdis to turn on (off?) the startup/exit info?

in cddcall.c - theres a constant MORPH_SCALE that can be used to
fix problems with facets not appearing in a morphology.
I guess it's a numerical problem, but it's annoying that there
doesn't seem to be any reason why some number (eg 5) work better
than other numbers. Larger numbers don't seem to work very well
either, which might be expected if it's a precision problem. 
One way to auto fix this might be to check the vertex adjacency
list (ie the warning: bad vertex message) and id it occurs then
redo exec_cdd() with a different MORPH_SCALE. 
- possibly fixed now, I removed the autoscaling code (ie it now
just plugs the lengths in without adjusting) and this seemed to
fix the problems.

If gdis is quit -> query about background jobs (if any) that are running
(eg a radio list 
- exit and leave jobs running (default) - problem: what about cleanup routine?
- exit and kill jobs
[Ok] [Cancel]

The new perspective mode drawing screws up the selection box 
checking in OpenGL - atoms aren't where they're expected to be.

The use of bash (exec -> "sh") is the cause of the pid
difference when spawning gulp jobs via the old method under linux.
The mac uses zsh (or something else) which doesn't do this.

CIF parsing needs a little work (specs?).
burkeite? CIF files in models/ are not correct, as the origin setting
is wrong. Changing it to :2 (instead of the :1 default) fixes the
problem - should gdis allow the user to manually change stuff like this?
Should parse for the symmetry operations.

Remove necessity to pre-calc num_frames in animation.

separate the frame drawing from the model atom etc. drawing, as
often we just wish to change the yellow/white frame border eg on
a change of active model.

Creator - instead of highlighting only when an atom is in the grid
plane, draw a line (shortest possible) to the grid plane. The effect
should be something like the old elite game (option to switch it
off though as it may be annoying in some cases).

When saving - allow conversion (if fractional) to cartesian?

In the middle of implementing a digitized sphere molecular/solvent
surface calculation method. Currently, only does contact and
solv. acc. points. Better sphere digitization? (triangle tessellation?)
Plus, a calculation of the respective surf areas (vol?) is needed.
Heading towards a simple summation - what about misfit inaccuracy where
the contact surface hits the re-entrant surface? 
Maybe replace molsurf calc with an inflating (ie fill) cube/grid algorithm.
This could make use of the previous solsurf calc for getting a list
of probe positions that define the re-entrant part of the molsurf.

Implement a better pbc method where a model has a flag
that indicates if pbc constraint (atom or mol) is on or off. Would
also need additional data in atom_pak specifying the translation
amount needed to bring the atom or mol (NB: these would be separate
numbers!!!) into the primary cell. This would allow toggling between
pbc constraint on & off because the base coords (x,y,z) would stay
the same - just the calc'd translations are applied by update_coords
'on the fly' when computing rx & pixel coords. This differs from the
current method which (irreversibly) forces (x,y,z) to be within the 
primary cell.
Could have a constraint pak w/ type = (none, atoms, mols, unfragment),
followed by a list of translations for each atom.

POVRay has problems if two like objects are placed at the same position,
eg partially occ. sites will cause render to fail. Perhaps some sort of
redundancy checker should be run before the .pov file is generated.

Implemented babel filter. Converts to .xyz, hence all periodic
info is lost - but AFAIK there is no babel output model type that
has this data, certainly not one that gdis currently understands.

Added symmetry code which can remove only rotation/inversions at present.

use gtk_widget_set_sensitive(w, T/F) to 'grey out' stuff we don't want
the user messing with? (eg rendering options on diff model types)
(trouble is, would have to make widget global, so pick_model could
make an appropriate call (refresh sensitivity) when switching models)

change all x,y,z data items to x[3] arrays, so vec macros can be used.

make it so that properties in the model tree (eg display shells)
can be added/subtracted individually & on-the-fly as the user changes
features of the model (eg such as pasting in some new shells).

enter alternate ?_exe programs, other than by hand editing .gdisrc?
(eg some sort of setup dialog)

use atoms->label for FF typing? bonds? 

Submit GULP job to background - bring up a tail -f -> dialog
to view what's happening. read potentials, or just copy the
orig (user supplied) inp file with the coords etc filled in.
Add a dump/movie output so you can view the results *after*
gulp has finished. 
Parsing potentials - decided not to be too clever, just search
for buck/lenn etc. and store that line & the next (maybe display
in a spread sheet/table fashion? ie w/o understanding what each means).
Also species & element are replicated. (spring too)
Can auto add things like print 1 (for tail) and dump/movie etc
Fails on potentials that span more than one line (check for '&' ?)

Implemented a user bond data structure which can be used to indicate
double, triple bonds. The bond must exist (ie based on cova radius).
Is there a better way? (it's a bit of a hack)
eg more sophisticated bond calculation/manipulation? (comb w/ typing?)

Do nicer looking ellipses instead of circles for angle measurements.

Implemented user resizing for the creator grid
  - mostly ok, but doesn't *quite* get the calculated grid Ang spacing right

Implemented code to interface with GULP & minimise structures
  - needs more testing/improvement of the interface
  - needs a bigger/better default potentials library

POVray sometimes puts ugly white dots on a rendered sphere. Only
noticed it happening occasionaly on hydrogen (ie on the grey shaded
regions of white spheres). OpenGL sometimes does this too - but AFAIK 
only on the cylinders in B&S or cylinder drawing mode.

Add scrolled win for viewing atoms & coords & status flags of a model.
Could then undelete/edit atoms directly. This could be a general 'data'
child of a model that contains periodic or not + sginfo/pbc etc that
can also be edited & auto updated by gdis.

Make an option to enable the user to either: save transformed model
(ie with all the centering & rotations done in gdis), or just save
the original configuration. The difference is mainly between using
(x,y,z) and (rx,ry,rz) as save coordinates - but also the centroid.

THINK ABOUT - an undo function (store past operations that have inverses,
              can undo an operation if it has an inverse).
            - internal scripting (guile?), so that gdis can be run to do
              operations on files without a GUI coming up.
            - with the use of model_ptr() to get model data, (ie the central
              model database can be 'locked') is it possible to use pthreads 
              to improve efficiency eg file I/O ???

