I got all this, and the engine IS getting re-created. Look at this log output. I drew 3 atoms, added a constraint of 1nm between two of them, optimized, changed the constraint to .2nm, then optimized and no graphic change occured. (i'm just making sure this is the correct implementation). If you use *min* bond length constraints, and he "natural" bond length is .01nm, then anything greater than that which is set as the minimum should be the one that gets optimized to? |--1nm--| 1--2---------3 |-.2nm?-| 1--2---------3 OpenGL extension version - 1.2 WARNING : SetCurrent() called before widget was realized ; skipping... GL is not yet initialized -> skipping light setup! added local light. PrintToLog[0] : A new project created. WARNING : SetCurrent() called before widget was realized ; skipping... WARNING : Update() called before widget was realized ; skipping... InitGL : setting up lights for cam 0 draw state is 1 orbit_xy skipped ; counter = 1 select state is 1 draw skipped ; counter = 1 selected atom 0 (atomtype = ffffffff). selected atom 1 (atomtype = ffffffff). handler_ButtonOK() : ref = 0x84e820 Constraint List: 0 - 1 ; 1 0 1.000000 100000.000000 1.000000 100000.000000 creating bt1-terms: 2 terms, 0 errors. creating bt2-terms: 1 terms, 0 errors. creating bt3-terms: 0 terms, 0 errors. creating nbt1-terms: PrintToLog[1] : Starting Geometry Optimization (setup = allmm, engine = tripos5.2 implementation ported from ghemical-1.00). PrintToLog[2] : Cycle Energy Gradient Step Delta E PrintToLog[3] : 0 5154.31997 kJ/mol 5.7531e+04 4.7927e-01 ********** PrintToLog[0] : 5 6.90232 kJ/mol 3.1937e+03 8.3765e-02 7.0326e +01 PrintToLog[1] : 10 0.00025 kJ/mol 1.7561e+01 9.4217e-05 4.4604e-04 PrintToLog[2] : 15 0.00000 kJ/mol 1.5539e-02 3.0924e-07 3.3341e-08 PrintToLog[3] : the delta_e termination test was passed. calling sys was modified! <= ******* UPDATED CONSTRAINT MIN LENGTH ***** creating bt1-terms: 2 terms, 0 errors. <-- engine recreated creating bt2-terms: 1 terms, 0 errors. <-- " " creating bt3-terms: 0 terms, 0 errors. <-- " " creating nbt1-terms: PrintToLog[0] : Starting Geometry Optimization (setup = allmm, engine = tripos5.2 implementation ported from ghemical-1.00). PrintToLog[1] : Cycle Energy Gradient Step Delta E PrintToLog[2] : 0 0.00000 kJ/mol 1.3750e-02 3.2849e-08 ********** PrintToLog[3] : the grad termination test was passed. PrintToLog[0] : the delta_e termination test was passed. On Fri, 2006-03-31 at 14:37 +0300, Tommi Hassinen wrote: > 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 >