Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conformational sampling help - geometry optimisation problems #382

Open
HeheHahaHoHoHo opened this issue Dec 15, 2024 · 6 comments
Open
Labels
MacOS Issue is related to MacOS question Further information is requested

Comments

@HeheHahaHoHoHo
Copy link

HeheHahaHoHoHo commented Dec 15, 2024

Hi all,
I am trying to produce a conformational search on nonenolide.
I initially use xtb to geometry optimise in GFN2-xTB in using methanol alpb model

xtb nonenolide.xyz --opt -c 0 -u 0 --gfn 2 --alpb methanol bar1M --namespace nonenolide_initialOpt > nonenolide_initialOpt.log

i then proceeded to do
crest nonenolide_initialOpt.xtbopt.xyz --gfn2 --alpb methanol -T 4 -chrg 0 -uhf 0
which seems to work until the end

| Multilevel Ensemble Optimization |
Optimizing all 686 structures from file "crest_dynamics.trj" ...
crude pre-optimization
Optimization engine: ANCOPT
Hessian update type: BFGS
E/G convergence criteria: 0.500E-03 Eh, 0.100E-01 Eh/a0
maximum optimization steps: 200
[##################################################] 100.00% finished.

0 of 686 structures successfully optimized (0.0% success)
Total runtime for 686 optimizations:

  • wall-time: 0 d, 0 h, 2 min, 50.308 sec
  • cpu-time: 0 d, 0 h, 11 min, 31.971 sec
  • ratio c/w: 4.063 speedup

Corresponding to approximately 0.248 sec per processed structure
empty ensemble filecrest_rotamers_0.xyz
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL

I looked into the crest-dynamics.trj files and the molecules do not seem broken and look fine (also they do not look that strained)

I played around (assuming my optimisation had some issues) and some errors i stumbled upon
I also tried pre-optimisation with xtb with --opt vtight and then tried the crest command above

tb nonenolide.xyz --opt vtight -c 0 -u 0 --gfn 2 --alpb methanol bar1M --namespace nonenolide_initialOpt > nonenolide_initialOpt.log crest nonenolide_initialOpt.xtbopt.xyz --gfn2 --alpb methanol -T 4 -chrg 0 -uhf 0

and got this error:

Calculation info

User-defined calculation level:
: xTB calculation via tblite lib
: GFN2-xTB level
: Molecular charge : 0
: Solvation model : alpb
: Solvent : methanol
: Fermi temperature : 300.00000
: Accuracy : 1.00000
: max SCC cycles : 500

Initial Geometry Optimization
Geometry successfully optimized.

WARNING Change in topology detected!
Topology change compared to the input affects atoms:
1(O) 2(C) 3(H) 4(C) 5(C) 6(C) 7(H) 8(O) 9(C) 10(C) 11(C) 12(H) 13(C) 14(O) 15(C) 16(C) 17(O) 18(H) 19(H) 20(H) 21(H) 22(H) 23(H) 24(H) 25(H) 26(H) 27(H) 28(H) 29(H) 30(H)

READ THE FOLLOWING CAREFULLY
A topology change was seen in the initial geometry optimization.
This could be an artifact of the chosen theory level (e.g. xTB).
You can check the optimization trajectory in the "crestopt.log" file.
Try either of these options:

A) Pre-optimize your input seperately and use the optimized
   structure as input for CREST. (Only recommended if structure is intact)

B) Restart the same CREST call as before, but ignore the topology change
   by using the "--noreftopo" keyword. (May produce artifacts)

C) Fix the initial input geometry by introducing bond length constraints
   or by using a method with fixed topology (e.g. GFN-FF).

Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
ERROR STOP safety termination of CREST

Based on (A) I then proceeded to attempt
crest nonenolide_initialOpt.xtbopt.xyz --opt tight -alpb methanol -gfn2 -chrg 0 -uhf 0 -T 4
which leads to a weird "successful" geometry optimisation

Calculation info

User-defined calculation level:
: xTB calculation via tblite lib
: GFN2-xTB level
: Molecular charge : 0
: Solvation model : alpb
: Solvent : methanol
: Fermi temperature : 300.00000
: Accuracy : 1.00000
: max SCC cycles : 500

      ┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
      │           GEOMETRY OPTIMIZATION SETUP           │
      ┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
      │   algorithm                     ANCOPT          │
      │   optimization level         tight (1)          │
      │   max. optcycles                   200          │
      │   ANC micro-cycles                  20          │
      │   degrees of freedom                84          │
      ├─────────────────────────────────────────────────┤
      │   RF solver                   davidson          │
      │   Hessian update                  bfgs          │
      │   write crestopt.log              True          │
      │   linear?                        False          │
      │   energy convergence        0.1000000E-05 Eh    │
      │   grad. convergence         0.8000000E-03 Eh/α  │
      │   maximium RF displ.         1.0000000          │
      │   Hlow (freq-cutoff)        0.1000000E-01       │
      │   Hmax (freq-cutoff)         5.0000000          │
      │   S6 in model hess.         20.0000000          │
      └─────────────────────────────────────────────────┘

                             CYCLE    0                                 
  • total energy : -45.8401447 Eh change ΔE 0.0000000E+00 Eh
    gradient norm : 0.0000243 Eh/a0 predicted 0.0000000E+00 ( -0.00%)

generating ANC from model Hessian ...
Using Lindh-Hessian (1995)
Shifting diagonal of input Hessian by 8.2450733776528520E-003
Lowest eigenvalues of input Hessian
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.010000 0.010448 0.012718 0.013957 0.014477 0.016153
0.016361 0.017065 0.018196 0.018993 0.021503 0.021755
Highest eigenvalues
1.447169 1.476450 1.516883 1.846698 1.952443 2.275661

                             CYCLE    1                                 

total energy gain : -0.0000000 Eh -0.0000 kcal/mol
total RMSD : -1.0000000 a0 -0.5292 Å

SUCCESS!
geometry successfully optimized!

FINAL CALCULATION SUMMARY

Final molecular gradient ( Eh/a0 ):
∂E/∂x ∂E/∂y ∂E/∂z
-0.00000007 0.00000014 -0.00000158
-0.00000254 0.00000178 -0.00000055
-0.00000299 0.00000213 -0.00000095
-0.00000053 0.00000179 0.00000006
-0.00000021 0.00000059 0.00000157
0.00000188 -0.00000172 -0.00000122
0.00000305 -0.00000173 -0.00000115
0.00000365 -0.00000090 0.00000449
0.00000256 0.00000022 -0.00000237
0.00000133 0.00000139 -0.00000336
0.00000092 -0.00000098 -0.00000006
0.00000111 -0.00000179 -0.00000173
-0.00000054 -0.00000510 0.00000142
-0.00000065 0.00000244 0.00000104
-0.00000048 0.00000062 0.00000184
-0.00000349 0.00000337 0.00000331
-0.00000280 0.00000551 0.00000417
0.00000115 0.00000106 -0.00000300
-0.00000101 0.00000240 -0.00000002
-0.00000241 0.00000248 0.00000135
-0.00000162 -0.00000160 0.00000274
0.00000306 0.00000147 -0.00000463
-0.00000082 -0.00000081 -0.00000446
0.00000360 0.00000208 -0.00000289
0.00000210 0.00000058 -0.00000533
-0.00000161 -0.00000344 0.00000285
0.00000071 -0.00000776 -0.00000048
-0.00000208 -0.00000622 0.00000418
-0.00000049 0.00000072 0.00000247
-0.00000075 0.00000128 0.00000228
Gradient norm: 0.00002390 Eh/a0

Writing crest.engrad ... done.

Output structure:
30

O NaN NaN NaN
C NaN NaN NaN
H NaN NaN NaN
C NaN NaN NaN
C NaN NaN NaN
C NaN NaN NaN
H NaN NaN NaN
O NaN NaN NaN
C NaN NaN NaN
C NaN NaN NaN
C NaN NaN NaN
H NaN NaN NaN
C NaN NaN NaN
O NaN NaN NaN
C NaN NaN NaN
C NaN NaN NaN
O NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN
H NaN NaN NaN

Optimized geometry written to crestopt.xyz

TOTAL ENERGY -45.8401447081 Eh
GRADIENT NORM 0.0000238999 Eh/a0

Wall Time Summary
CREST runtime (total) 0 d, 0 h, 0 min, 0.327 sec
Geometry optimization ... 0 min, 0.120 sec ( 36.827%)
I/O and setup ... 0 min, 0.207 sec ( 63.173%)

  • wall-time: 0 d, 0 h, 0 min, 0.327 sec
  • cpu-time: 0 d, 0 h, 0 min, 0.760 sec
  • ratio c/w: 2.325 speedup
  • Total number of energy+grad calls: 2

CREST terminated normally.

The NaN issue is puzzling and i have tried several different ways to get a different result. I'm not sure where to proceed from this and would like any feedback on this matter.
(If there's no error with the software, im also guessing if i have to perform constrained conformational sampling instead for this molecule (?)).

Kind regards,
hehe.

@HeheHahaHoHoHo HeheHahaHoHoHo added the question Further information is requested label Dec 15, 2024
@pprcht
Copy link
Contributor

pprcht commented Dec 16, 2024

Sorry, no idea. From that description I can't see what might be going wrong here.
What program version was this? Maybe you caught one with the incorrect implicit solvation (#312) that is acting up here?

@HeheHahaHoHoHo
Copy link
Author

HeheHahaHoHoHo commented Dec 16, 2024

I installed via conda and the version seems to be 3.0.2 on Mac. I was looking at past questions/issues and also came to the conclusion that it may be the implicit solvation. I do get trj files so i might just grab those structures and run in xTB since this runs fine but not entirely sure why crest geometry optimisation gives me issues at times even if my molecules are intact/not strained..?
Thanks for the reply regardless :)

@pprcht
Copy link
Contributor

pprcht commented Dec 16, 2024

Hm, running on Mac might be an issue as well. The installation technically works, but it is not well-tested. Though, that's more of a personal feeling rather than hard evidence.

@HeheHahaHoHoHo
Copy link
Author

Thanks for the reply.
I guess ill try and install on my windows and see what goes. (if it works, ill report back)
Also, is there a potential issue on the conda build and maybe building from the master branch is recommended?

@pprcht
Copy link
Contributor

pprcht commented Dec 16, 2024

I guess ill try and install on my windows and see what goes. (if it works, ill report back)

If you are talking about Ubuntu subsystem for Windows, that might work. Windows Powershell won't.

Also, is there a potential issue on the conda build and maybe building from the master branch is recommended?

Yes, building from the master branch is recommended, conda does not automatically do that.

@HeheHahaHoHoHo
Copy link
Author

HeheHahaHoHoHo commented Jan 7, 2025

Hi,
I wanted to quickly get back that I have tried this on my windows WSL with the precompiled binary 3.0.2 (intel) and it works completely fine so definitely some issues with MAC (not sure if conda is the issue either. I did not try to build from conda on my wsl). Can see that some work might be done on MAC but happy to know it worked well on my windows :) Thanks for the free metadynamics hehe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS Issue is related to MacOS question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants