Comments (12)
You can find #32 related. Try to comment out normalization step: #32 (comment)
In case you're using MoreThuente linesearch
from lbfgspp.
Thanks for the comment. However, this does not really apply for my problem, as I am not using the box-constrained approach. Furthermore, it happens, depending on the 3D structure for several LineSearch methods.
I have provided some samples and documentation:
https://gist.github.com/conradhuebler/445e6cd16c1f91230a9386c5abc320eb
from lbfgspp.
I'll take a look over the weekends.
from lbfgspp.
Since I am not super familiar with the library, I want to make sure one thing before I dive into the details. In your program, is the gradient computed analytically or numerically? Sometimes this is important since the line search can heavily rely on the accuracy of the gradient.
from lbfgspp.
Depending on the method to calculate the energy, the gradient is calculated either numerically or analytically. If no method is specified or '-method uff' is added, the gradient is still calculated numerically, but if the methods are gfn1 or gfn2 are used, the gradients are evaluated analytical.
However, in older versions of LBFGSpp, the numerically evaluated gradient did not make trouble.
from lbfgspp.
After some investigation I guess it is because in the old version, the line search silently exits if it reaches the maximum iteration (76ac83f), and in the new version it explicitly raises an exception.
I would consider allowing some "failed" line searches in the new version. But still, an accurate computation of the gradient is invaluable in any case.
from lbfgspp.
Thanks for having a look at it. I am currently implementing the analytical gradients for the universal force field and with two terms out of five replaced, the optimisation is faster (of course) and much smoother.
However, another method, which I just use via an interface and already is having analytical gradients, fails. So some kind "failed" lines searches sound great.
from lbfgspp.
I have pushed a commit (6803e70) that realizes such an idea. Could you help test on your problems? Thanks.
from lbfgspp.
Hi,
I now have implemented the last part of the analytical gradient. I will compile some test cases in an extra branch. However, as far as I tested it already, your update does not really fix the issue, and it is more or less independent of the scheme to calculate the gradient.
More will follow in the next days.
Nevertheless, thanks for your time :-)
from lbfgspp.
Sure. Some minimal examples would be greatly appreciated.
from lbfgspp.
Hi, I have added some example structure files and some short explanation to https://github.com/conradhuebler/curcuma/tree/lbfgs/test_cases/optimisation in the branch https://github.com/conradhuebler/curcuma/tree/lbfgs.
It might be a bit tricky to get started first but:
The energy and gradients are obtained using the methods: UFF, GFNFF, and GFN2. They can be requested with
-method uff
-method gfnff
-method gfn2
-method uff is not necessary, as uff is the default one. There are numerical and analytical gradients for uff (-gradient 0 and -gradient 1). The gradients in gfnff und gfn2 are analytical. However, these methods are slower and come from third-party software. The first thing to start would be with the triose structure.
So within that directory
~/yourpath/curcuma -opt input.xyz with LBFGS master and LBFGS (7e38486)
This should show the difference.
Thanks and good luck :-)
from lbfgspp.
Hi there,
I have been playing around with the optimisation. I think, that for optimisation of chemical structure, throwing an exception if the linesearch fails etc is to harsh. The optimisation may proceed if this errors are just ignored for some steps. However, more digging is mandantory.
I will adopt my fork to realise single step optimisation, where each of the termination condition can be handled individually and maybe some parameters can be altered during the optimsation. That is more (al)chemsitry than maths and if you are not interested in having this abilities in your library, than feel free to close this issue.
from lbfgspp.
Related Issues (20)
- [PR Suggestion] Remove runtime exceptions HOT 2
- Division by zero in Cauchy.h HOT 4
- Github Release? HOT 6
- Bounded LBFGS (box) doesn't work well HOT 1
- LBFGS Breaks on this trivial case HOT 2
- Comparison with Pythons scipy.optimize lbfgsb HOT 6
- Several ways to crash LBFGS++ HOT 8
- Examples hang on Linux/ppc64le HOT 1
- LineSearchNocedalWright - NaN in Step 2 (Zooming) HOT 1
- How to create a functor for LBFGSpp given objective function and its gradient HOT 2
- compare with some optimization tools? HOT 2
- The optimization returns 6 precision numbers HOT 2
- Division by zero in BFGSMat.h (apply_Hv(...)) HOT 2
- More Thuente line search can find proper step HOT 10
- Why the stop criteria is like Gradient Norm< epsilon_relative * x.norm() HOT 9
- `dg_hi` set but never used warning in LBFGSpp/LineSearchNocedalWright.h ? HOT 1
- Some compiler warnings. HOT 1
- How about support auto-diff for computing the gradient
- linesearch fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lbfgspp.