Comments (5)
I can make a PR for the CMake files once I have cleaned them up.
There could be a few minor changes required to the overall build process to keep things nice an tidy though.
(Only one list of the sources, the way xtb_version.fh
is generated, etc.)
from xtb.
Thanks for the report.
I guess the bond order problem is kind of known (at least I knew that I have to fix it at some point).
A lock would certainly help to prevent several xtb
calls to run and use the same global variables, but I would rather prefer to purge all global variables from the code base than managing a mutex. So this is a long term goal.
Regarding the CMake build, would you consider sharing the build files? I've never used CMake myself for a project, but there is some interest in building xtb
with something else than meson.
from xtb.
My last try to remove global variables was #38, but it failed eventually.
The concept of the API currently ensures that the global storage is setup correctly every time, this causes problems when to instances try to call the API at the same time. This also makes the API slower.
A solution would be to separate these steps and require to initialize and finalize xtb
before using the API, which would be okay, I guess. The initialization state (uninitialized, GFN-FF, GFN0-xTB, GFN1-xTB or GFN2-xTB) could be saved to prevent using it with the wrong method.
from xtb.
The initialization state (uninitialized, GFN-FF, GFN0-xTB, GFN1-xTB or GFN2-xTB) could be saved to prevent using it with the wrong method.
So ten threads would then hold a state of their own each? That would work.
Given that I have not looked into the code that much, I'd ask what there actually is that is initialized and can be kept across calculations with different molecules.
I assume thats this is many of the parameters and precalculated stuff from the parameters?
Coming more from a C++ side, not having dealt with Fortran in a while, I wonder if Fortran has something along the lines of constexpr
(C++) ? This would mean that this particular chunk of data would be resolved at compile time, meaning this data is never reinitialized. (This means the data is then folded into the binary and that binary is then bigger, loads a bit slower and compiles a bit slower.)
from xtb.
I would prefer ten threads with independent states, but no. For the near future it will be something like the library having one global state, deciding which method is used, but all the threads can perform the calculation with the given method independently.
Generally Fortran is pretty good at evaluating even complex expressions at compile time, so this is not a problem at all. The real problem is the way the parametrisation is handled, this code needs some serious refactoring to make it possible to use compile time evaluation in the first place. Also I'm somewhat afraid of touching this part of the code, because it will cost me a lot of time and hardly anybody will notice it except for new bugs introduced.
from xtb.
Related Issues (20)
- Clarify copyright holders of dipro HOT 2
- Manual download of mctc-lib and skip git cloning HOT 5
- forrtl: severe (174): SIGSEGV, segmentation fault occurred using molecular dynamics and GFN-FF HOT 6
- xtb-6.7.0/src/gfnff/gfnff_eg.f90 compilation error
- Keywords compatibility XTB & TBLITE
- compilation error on Intel/2020.0.166 HOT 3
- --tblite ignores solvation (--alpb & --gbsa) HOT 4
- Meson test failed after installation HOT 2
- xtb optimization failes for gold-copper nanocluster HOT 1
- cpcmx energies are inconsistent across different files HOT 2
- Help message incorrect for GBSA and ALPB default reference state HOT 1
- uv-visible spectroscopy with xtb HOT 2
- aiss aggregate - parallel optimizations HOT 1
- How can I calculate the applied force on a specific atom with GFN2-xtb? HOT 3
- DFT optimization using orca fails with abnormal termination of xtb HOT 2
- NAMD/ORCA: Could not find QM output file Error HOT 1
- Biological structure optimization issue HOT 1
- LMO calculation for alkali atoms
- aISS docking issue on a biological structure HOT 4
- Build Error When Enabling GPU Support: Unsupported C Standard HOT 2
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 xtb.