On Wed, Jan 4, 2012 at 8:47 AM, Noel O'Boyle <baoille...@gmail.com> wrote: > On 4 January 2012 12:53, David Lonie <lonieda...@gmail.com> wrote: >> On Tue, Jan 3, 2012 at 11:09 PM, Geoff Hutchison >> <ge...@geoffhutchison.net> wrote: >>> On Jan 3, 2012, at 2:45 PM, David Lonie wrote: >>>> beyond the trust radius. I didn't track down which is happening, but >>>> switching to the Newton2Num line-search method fixes the problem for >>>> me (see OBForceField::SetLineSearchType()). >>> >>> Do you think we should switch the default to the Newton line search? >> >> >From my minimal testing, it seems to be more reliable. I haven't done >> any real benchmarking, but from counting energy evaluations, the >> expense shouldn't be too different. The Newton2NumLineSearch method >> performs 10-11 energy evaluations, and the LineSearch(double *, double >> *) method also performs 10 evaluations, unless the energies converge >> to 1e-3 sooner than that. >> >> I'll push a patch that makes the Newton line search default if there >> are no objections. > > Is there any objective way to decide which is better? e.g. for a set > of 10000 3D structures and the same starting point, which of the two > search methods converges to a minimum? is the minimum at lower energy? > etc?
If there is an easily parsed / imported / OBConv-ertable database of structures somewhere, it wouldn't be too difficult to come up with a test. Perhaps one of the roundtripping/canonicalization tests I've seen discussed here could be adapted? But I'm doubtful that the line-search method would make a huge difference in the final energies in most of the structures. I'm looking at some very large systems (3000+ atoms) with somewhat unusual bonds and tons of constraints and intermolecular interactions, so there may be some discontinuities / unusual features in the energy surface that were causing problems with the simple line-search. For simpler systems both methods should give the same final result, since the line-search is just used to determine how far of a step to take along the calculated gradient. Simple line-search is similar to a bisection method, and the Newton technique fits a parabola to three points and then steps to the minimum (I think so anyway -- I haven't actually broken down the math in the function). So Newton requires fewer steps, but more energy evaluations per step. Other important factors to test would be the trust radius (max step size) and step adjustment factors in the simple line-search -- I'm not sure where the currently used parameters came from. In addition to the final energies, it would be interesting to count calls to Energy() and steepest descent/conjugate gradient cycles are required. We could run a smaller test set through a profiler and hunt for bottlenecks, too. This may be a good project for an undergraduate...I might actually be able to find someone to do this next semester. If I can work something out I'll post back here. Dave Dave ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel