Releases: Quantum-Dynamics-Hub/libra-code
Libra v5.8.1
What's Changed
Human-generated description:
- Cleaned up and optimized the F-tracking and tNAC phase correction methodologies, added some experimental functions related to it;
- libint2 wrapper of higher moments in GTO basis (x, y, z, x^2, xy, ... z^3);
- important bug fixes in the molint implementation of some integrals with Gaussian functions, added the corresponding documentation/derivations;
- ChatGPT-generated implementation of the Munkres-Kuhn algorithm;
- Added new model Hamiltonian for phenol molecule;
- on-going development of the QTSH methodology
- added a good amount of testing modules for pytest (at the Python level)
- multiple minor and not-so-minor fixes and language style impovements, adding clang support by @foxtran
Automatically-generated info:
- Add diabatic hop features to FSSH-2 and FSSH-3 by @DaehoHan in #218
- Skipping the active state computation in the other rep if not necessary by @DaehoHan in #219
- Spin adapted configuration + bug fix for saving sd files by @MohammadShakiba in #221
- bug fix for CP2K pdos labels returning empty list by @MohammadShakiba in #222
- Fix the loop in printing 2D wavepackets by @DaehoHan in #226
- Minor fixes by @foxtran in #224
- Fix some compilation warnings/error by @foxtran in #227
- Fix qtag_potential: two overloads with and without AA-BB-CC by @foxtran in #228
- add function for fitting population by @SpringDabao in #231
- Add deco time test by @DaehoHan in #230
- New Libint functions for computing the integrals in GTOs with Cartesian moment operators by @MohammadShakiba in #229
- Bug fix for step 2 file saving and extension of states Slater determinants in step 3 by @MohammadShakiba in #233
New Contributors
- @foxtran made their first contribution in #224
- @SpringDabao made their first contribution in #231
Full Changelog: v5.8.0...v5.8.1
Libra v5.8.0: F-tracking and simplified NAC phase correction
The main changes
-
The new F-tracking and simplified NAC phase correction are added and tested (the main reason for this release)
-
Libra/MOPAC interface is developed but is yet to be demonstrated;
-
QTSH is implemented but is yet to be demonstrated
-
A critical bugfix in the step3 of Libra/cp2k interface - to possibly help solve the sudden jump problems we have observed recently
-
The documentation of the main function in
libra_py.dynamics.tsh.compute
is updated and is now consistent with the parameters of thedyn_control_params
class. -
Surface hopping in diabatic representation is added and is being tested by Daeho Han; within this development, new variable to hold active diabatic state indices for all trajectories are added. Several ways of computing diabatic populations are added: based on counting trajectories and on transformation of adiabatic SE or SH populations.
-
Added auxiliary function to determine the active space selection in step3 of Libra/cp2k interface.
More formal changelog:
- Update QTSH by @DaehoHan in #212
- Bug fixes for ML workflow, step3, CP2K methods and data reading for BLLZ by @MohammadShakiba in #213
- Added an auxiliary function to step 3 for generating new active spaces based on the number of occupied and unoccupied orbitals by @MohammadShakiba in #214
- Reuse the rep_sh param to consider hops in the diabatic representation by @DaehoHan in #215
- Bug fixes for step3 many-body by @MohammadShakiba in #216
Full Changelog: v5.7.1...v5.8.0
Libra v5.7.1
Full Changelog: v5.7.0...v5.7.1
Libra v5.7.0
The major additions
- the new FSSH-3 methodology is implemented
- the FSSH-2 of Araujo et al. is implemented (with slight changes compared to the published version, but likely this is what was intended)
- added Jasper-Truhlar criterion of velocity reversal on frustrated hops
- added MD trajectory alignment function/script which processes the MD trajectory to remove the center of mass translation and the overall rotation of the molecule as whole (this is a Python re-interpretation of the Fortran code found in the auxiliary tools of NWChem)
- added a number of published spin-boson (and their many-state generalization) models withing the GLVC (generalized linear vibronic coupling models)
- implemented the Ohmic and Drude-Lorentz baths discretizations
- implemented a correct way of computing SH-based diabatic populations of states
- revised the way to initialize adiabatic states when the initial conditions are chosen in the diabatic representation
- added a number of matrix decompositions and linear equations solvers (based on matrix decompositions) from Eigen 3 code
- fixed bugs in sum_col and sum_row functions of generic matrix class
- significantly accelerated calculations of the matrix of the SD overlaps but using numpy methods in
step3
module of the NBRA workflow (see below) - implemented a lot of the functions and workflow for the ML-based prediction of KS Hamiltonians (see below)
- ongoing work on clarifying the MFSD (see below)
Auto-generated updates
- Update MFSD by @DaehoHan in #207
- Use act_states for saving the reference state of MFSD by @DaehoHan in #208
- Kohn-Sham Hamiltonian mapping with machine-learning first version by @MohammadShakiba in #209
- Revision of step3 and high-throughput implementation of KS ML map approach by @MohammadShakiba in #210
Full Changelog: v5.6.0...v5.7.0
v5.6.0
Final version of the XF-based methods (SHXF, MQCXF, and MFXF), coming along with the manuscript submission.
Major implementation was done already in the previous implementations. The present version ensures the consistency of some underlying transformation.
What's Changed
- XF propagations for the LD scheme by @DaehoHan in #200
- New functions in data_read and molden_methods by @MohammadShakiba in #201
- Update the XF algorithms by @DaehoHan in #202
- Fixing time propagation in XF by @DaehoHan in #204
- Fix the reordering of phase gradients by @DaehoHan in #205
- Elaborate on the comments about the td widths by @DaehoHan in #206
Full Changelog: v5.5.0...v5.6.0
Libra with TC-NBRA, MASH, FSSH2, revDISH, revised TSH and Ehrenfest, phase-corrected exact calculations
1. Structural changes and paradigm changes
-
Restructured the libra_py library to set all the package-specific modules into a separate sub-library. Adapted importing
libraries based on packages folder -
Simplified the interface of hop proposal, hop acceptance, and hop handling functions, as well as dish - these all
are now taking the dyn_variables input rather than individual variables of all kinds -
Moved DISH coherence time updates inside dish function, added other decoherence options although they are not doing anything - just for completeness
2. New major capabilities
-
[src/nHamiltonian and src/dyn]: The phase/state-consistency transformations (a.k.a local diabatization transformations)
are now applied directly to element of the nHamiltonian object right after the new diabatic-to-adiabatic transformation is computed
they are removed right before re-computing the time-overlaps at the next dynamical step. This way, the Hamiltonian properties
are well-behaved and can be used both the TSH and Ehrenfest methods. This makes the Ehrenfest method conserve energy even in the adiabatic
basis when NACs are used, as well as using the NAC-based integrators in the TD-SE integration of the TSH methods. This is a very
critical change that hopefully makes the current implementation more reliable and robust than before. -
[src/dyn]: added themrally-correct NBRA (TC-NBRA) approach
-
[src/dyn]: initial implementations of the Exact Factorization (XF) and mixed quantum-classical XF (MQCXF) methods
-
[src/dyn]: Implemented MASH scheme
-
[src/dyn]: Implemented FSSH2 scheme of Leonardo Araujo
-
[src/dyn]: A new implementation of the DISH method, it is suitable for NBRA workflow too
-
[src/dyn/wfcgrid2]: Added a phase-consistency correction to the diabatic-to-adiabatic transformation matrices computed at all grid points.
This change is important since otherwise the kinetic energy calculations won't converge with dx due to highly-oscillatory behavior of the
wavefunction in regions of strong nonadiabaticity. With this correction, the energy conservation is now much more robust and the convergence
of kinetic energy w.r.t. the grid's dx is achieved. The wavefunctions are well-behaved too. -
[src/math_meigen]: Added Cholesky decomposition of real matrices
-
[libra_py.models]: Added Ferretti Hamiltonian
-
[src/dyn]: added Voronoi tesselaiton scheme and initial conditions sampling based on it
-
[libra_py.dynamics.exact]: Added a new capability to the exact propagation function to save the wavefunction snapshots into files for their
later plotting and animation. Updated the corresponding functions' documentation. -
[libra_py.packages.cp2k.methods]: Added analysis function for pdos, exc analysis, energy vs time to CP2K methods
3. Improvements and new minor capabilities
Dynamics
-
Made the velocity rescaling happening only if the initial and final states are different
-
Added the option to save the derivative coupling vectors along the trajectory
CP2K and NBRA
-
Fixed the cp2k input generator script so that the calculations are more robust, correct, and lead to convergences
-
Added new functionality to CP2K input generator for hybrid functionals
-
Updated CP2K input generator
-
Added new functions for computing MO coefficients + description of functions
-
Added "restart_file" parameter for step_2. It is useful for big systems to have the initial guess of SCF orbitals
-
Added isUKS implementation of open-shell systems. In Step3 of cp2k interacing-code, modified some functions to
account for systems with different numbers of electrons in alpha and beta channels.
QTSH
- implemented an auxiliary function needed in kinematic momentum calculations for QTSH
GWP
- added derivatives of the GWP functions, in a somewhat different style
4. Bug fixes and documentation
src/dyn
-
Fixed the bug with the velocity rescaling of only the quantum nuclear DOFs
-
Fixed some bug that was breaking even normal FSSH, modified interface of the hop acceptance function to give a bit more flexibility
src/nHamiltonian
- Fixed a bug in the copy_content function of the nHamiltonian class where it would copy diabatic time-overlap into the
adiabstic one, also added new functions to transform the elements of the nHamiltonian class according to certain
transformation matrix, there are several kinds of such transformations with the same matrix - forward,backward, explicit, implicit or normalizing
DISH
- fixed a bug in the existing implementation of the DISH method
QTAG
- Adding a careful documentation and somewhat revising the interfaces of the QTAG functions, added new auxiliary ones
Models
- Fixed a bug in Holstein_gen function that would create an incorrect size of the first derivatives matrix
CP2K
-
Added some documentation in the cp2k input generation module
-
Fixed reading of TDDFT data in CP2K v23 - a very important fix, because it sometimes led to strange
energies, especially of the ground state.
MFSD
- Fixed the implementation of the Shwartz decoherence times, also included the options to account for the local diabatization
approximation in computing MF forces, added some documentation on the related functions, fixed some bugs in MFSD -
the effective NAC calculations, momentum rescaling. The momentum rescaling and corresponding Hamiltonian update
functions are also added in the main dynamics module for MFSD. Fixed more bugs in the mfsd code - the calculations of the
Ehrenfest energies was not done correctly. Also, fixed the generic code for computing Ehrenfest energies - need to split by the trajectories
dynamics_plotting and data_visualize
-
updated the decomentation of the dynamics_plotting function that plots surface and fixed a bug of not having the
output directory to store figures produced -
Revised dynamics_plotting and data_visualize modules, added some documentation, added new member functions to the dyn_variables class
step2 of NBRA
- Fixed the reindexing function for isUKS=True
step3 of NBRA
- Debugging and revisiting mapping functions for Slater determinant calculations of NACs
Added new mapping module with fully revised math and simplified interface
DFTB+
-
Fixed some functions in DFTB+ package for it to be used in current NA-MD procedures, added documentation,
got rid of the critical params, replaced them by default onese, fixed a minor bug in the dftb run_step2 function
so the overlaps are now correct, changed the number of result objects returned by the do_step function -
Fixed the DFTB+ methods for reading time-overlap matrices - made them more robust to the known problem of having NaN
and wrong values in the off-diagonal blocks of the super-molecule overlap matrix calculations
FT
- Updated the documentation of the ft2 function in the ft module
5. Cleaning up
-
Removed deprecated dynamics tutorials
-
Removed the DFTB time-overlap calculation tutorials. Moved the tutorial to the Tutorials_Libra repo and revised it
-
Removed excessive output from libint2 code
-
Cleaned up some commented and unnecessary code in the Dynamics.cpp and related files
-
Revised the LZ workflow, removed deprecated or obsolete functionality and keywords
-
Removed the examples of ACF and FT calculations. Now moved to the Tutorials_Libra repository
Significant refactoring of the code, Local diabatization and more
-
Code restructuring:
-
significantly restructured the code (via the tsh_revision branch). Now, the dynamics code
is much more compact, clean, and consistent. New functions are added in a modular way to
enable more compact coding of the may computational workflow. -
reducing the nesting levels and making it more modular: the hamiltonian library and namespaces
are broken into atomistic (for MM and QM) and models (collection Hamiltonians) modules -
the nhamiltonian library and namespace is made top-level, to avoid unnecessary dependencies
-
all the dynamical variables are now held in the
dyn_variables
class. Functions are coded to
take this data class. Withing it, the amplitudes or density matrix variables can be used, the conversion
functions (including from-to different representations are available) -
Added cctor and memory status check functions to the nHamiltonian class - now it all works fine, removed the
implementation of the propagators that dependend on the projectors, added auxiliary Hamiltonian as an input parameter
to the compute_dynamics function and reflected that in the Python wrapper function, changed the compute_St functions
to take two nHamiltonian objects as input, removed the use of Uprev variable in the compute_dynamics function,
since it is now deprecated
-
-
New methods and variables:
-
the local diabatization approach and multiple electronic integrators are added: There are algorithms based on
matrix exponential, rotation, and others (e.g. QTAG-like). The integrators are available for diabatic and adiabatic
representations. -
the propagation in terms of density matrix is now available (solving the QCLE). The QCLE integrators are coded.
-
added Shenvi-Subotnik-Yang (SSY) phase correction algorithm (to fix the decoherence-induced phase effects)
-
added Zhu's Liouvillian-based phase correction method (developed as an alternative to the SSY method)
-
added Zhu-Nakamura (ZN) hop attempt probability.
-
new dynamical control variables added to provide a more convenient definition of the computing recipes
-
added new electronic integrator in the diabatic basis - according to the qtag approach
-
added new control variables for various schemes of variables updates, added new functions for computing hopping probabilities in a more efficent way
-
added generalized Holstein Hamiltonian
-
reactivated BCSH and DISH methods
-
added packages.cp2k module that implements an input generator for cp2k
-
added Morse model Hamiltonians and the parameterization of Coronado-Xing-Miller
-
-
Deprecations and removals:
-
the external_hamiltonian class/namespace is deprecated
-
the Ensemble class is deprecated
-
update_Hamiltonian_ functions are deprecated in favor of the new general version
-
removed a lot of unnecessary (commented or not) C++ code in files in the dyn module (e.g. Dynamics.cpp, Energy_and_Forces.cpp, etc.)
-
the state tracking and phase correction approaches are deprecated in lieu of the local diabatization-based
approaches: the original one of Granucci, Persico, and Toniolo + a number of other interators derived in the
TCA paper (to be published) -
Many old nearly duplicate or confusing functions for electronic integration are removed to clean up the code, yet to keep
the essential functionality. -
moved tutorial on plotting model Hamiltonians to the CyberTraining repo
-
removed outdated QTAG examples
-
-
Fixes:
-
fixed a minor but important bug in GFSH; the algorithm is now working
-
fixed the false fail of the SDM (mSDM) method which could happen under certain conditions when the populations
on a given state is close to 1.0
-
-
Misc:
-
revised and simplified the installation instructions (including building a suitable Conda environment)
-
simplified and optimized build/compillation scripts, started using precompiled headers (PCH)
-
made the C++ code compatible with the C++11 stnadard
-
-
Other notable changes:
-
improved quality of dynamics_plotting plots and added new options for plotting
-
Added plotting of the time-resolved Hamiltonians, time-overlaps and projections
-
changed NULL to nullptr
-
Libra with the QTAG method
The major changes/additions include:
- added and validated the quantum trajectory adaptable Gaussian (QTAG) methodology, including scripts and functions at both C++ and Python levels;
Other significant changes:
- added new functions in the GWP library, needed for more convenient implementation of the QTAG;
- implemented Meek-Levine's norm-preserving interpolation (NPI) algorithms to compute scalar NACs;
- added new functions to the wfcgrid2 class - e.g. for finding the hyperplanes, adding complex absorbing potential, and more;
- removed many tutorials/examples that have been moved to the Tutorials_Libra repository;
- changes to the auxiliary functions for the TD-DFT excitation analysis, to reflect changes in cp2k software v9.1;
- updated build instructions (cmake files) to correctly compile/build the code with the new libint2 library;
- important bug fix of the NAC calculation workflow in the case of spin-polarized DFT calculations;
- added new functions for computing the time-overlaps with ORCA and OpenMolcas;
Revised xTB/Libra workflow
Major Changes
- Revised the installation instructions and CMakeLists to work with the newer version of Libint2. Added links to the installation videotutorials.
- Added the option to conduct the NBRA calculations without explicitly running many trajectories. In this case, one Hamiltonian is computed for each nuclear trajectory and re-used by many stochastic trajectories.
- Fixed the bug in the step2 of the NBRA methodology with xTB/Libra, where S AO matrices were used instead of St AO matrices.
- Fixed model Hamiltonians of Zhu in the models collection to correctly work in multi-trajectory settings
- in the QTAG: added new LHAe and BATe routines.
What's Changed
- Devel by @mdutra21 in #153
- Bug fixes + NBRA type calculations for step4 by @MohammadShakiba in #154
Full Changelog: v5.2.0...v5.2.1
Libra with the xTB/NA-MD workflow
Major changes
- Finalized and tested the xTB/NA-MD workflow:
- used to conduct studies of Si QDs and C3N4 monolayer;
- can now handle periodic systems
- file storage optimizations
- Improving the general NA-MD workflows
- adding new recipes
- new methods (e.g. MF-SD, BCSH, various decoherence times options)
- new control parameters
- QTAG
- the key elements are implemented and working, but need more work on the user interface and better integration into C++ layer
What's Changed
- Modified CP2K/Libra/Libint interface for DFT and xTB calculations by @MohammadShakiba in #129
- A new working version for step2 and step3 of the Libra/Libint interface by @MohammadShakiba in #130
- QTAG by @mdutra21 in #132
- Libra/CP2K workflow completed by @MohammadShakiba in #133
- bug fixes for single-particle SDs by @MohammadShakiba in #134
- Retry of qtag_ham.py changes by @mdutra21 in #137
- Devel by @mdutra21 in #138
- Devel by @mdutra21 in #140
- Nested dicts and getattr calls in Python QTAG by @mdutra21 in #142
- txt2 Saver Update + Dict Update by @mdutra21 in #144
- qtag_mom, qtag_prop updates by @mdutra21 in #145
- QTAG Docs Updates by @mdutra21 in #146
- Updated qtag/save.py by @mdutra21 in #148
- QTAG LHA Fix by @mdutra21 in #149
- qtag/save updates by @mdutra21 in #150
- Added cube visualizatio to step2 by @MohammadShakiba in #151
New Contributors
Full Changelog: v5.1.0...v5.2.0