On Fri, 6 Jun 2003, Joerg K. Wegner wrote: > Hello, > > thank's for libghemical, it works fine. > > Now i'm interested in calculating the surface (and properties) of molecules. > > i've found some related methods in ghemical, but i'm not really able to > see how the surface is stored and calculated. > > project.cpp: "volrend" > plane.cpp: volume_rendering_object Hi. Yep, the surface/plane classes are at plane.cpp and surface.cpp. These classes do not have any "hard-coded" functions that they call to calculate the values. This is because instead of making separate classes for each task (vdw_surface_plane, esp_plane etc...) I chose to do just one generic class that can display ANY function. So the classes take the function as a pointer to a function, and then call the function using this pointer to get the values! Please remember that in C/C++ you can use pointers to variables but also pointers to functions. > So here are my questions: > > 1. model sucessfull created > 2. what is the exact process to calculate a molecule surface > 2.1. init ? > 2.2. calculate, please exact method name with explicit parameters ? > 2.3. getData as 3 dimensional array or object ? The functions that finally get called via the pointer, are the functions engine::GetVDWSurface() engine::GetESP() engine::GetElDens() engine::GetOrbital() etc... I don't remeber if the above names are exactly correct but you will find them. If I remember correctly, the parameters are double engine::Get???(float * p1, float * p2) The parameter p1 is supposed to be an array of 3 elements; that is the x, y, z values of the point where the value is to be calculated. The return value is the value of the function which is calculated. If the parameter p2 is NULL, it is ignored. If not, it is supposed to be an array of 3 elements; dx, dy, dz which are the derivatives of the function in the point x, y, z. > is this only possible, when using glade,gtk and gtkgl ? You can call the engine::Get???() functions in any case, but the plane/surface classes use functions of OpenGL API. Regards, Tommi BTW : the idea of log4cpp is interesting, but I don't believe I have extra time for anything in the near future. :)