[ghemical-devel] Constraint View Patch
Tommi Hassinen
thassine at messi.uku.fi
Fri Mar 31 06:37:55 EST 2006
On Fri, 31 Mar 2006, Donald Ephraim Curtis wrote:
> I checkedthis out, it's getting called when you update the values of a
> constraint but the constraint isn't getting changed in the engine. I
Hello, this is what I tried to explain you earlier ; the constraint is not
getting changed in the engine object, because this is the way it is
designed to be. Instead of updating the engine object, the engine object
must be destroyed and a new one must be created so that the new constraint
values could be used.
This is a desing that I have deliberately chosen. I think there is a limit
when compilicated data structures should be updated, and when they should
be discarded and re-built from scratch. For the model <-> engine interface
I have chosen that all changes (addition/removal of atom/bond and now also
constraint) invalidates the engine object.
If you are not sure whether the engine object is discarded, please do the
following tricks:
1) draw an extra atom somewhere ; the engine object is destroyed.
2) erase the extra atom ; now the system is as it used to be.
Now if you for example compute the energy, the program sees that there is
no engine object that could be used, and it creates a new one. When a new
engine object is created, you can see at the console this kind of debug
messages:
creating bt1-terms: 10 terms, 0 errors.
creating bt2-terms: 18 terms, 0 errors.
creating bt3-terms: 18 terms, 0 errors.
Otherwise the operation is not shown to the user.
Regards,
Tommi
More information about the ghemical-devel
mailing list