-
Notifications
You must be signed in to change notification settings - Fork 6
Add 'ignore_state' in Launda-Zener hopping #185
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #185 +/- ##
==========================================
- Coverage 91.90% 91.87% -0.03%
==========================================
Files 47 47
Lines 6743 6758 +15
Branches 757 761 +4
==========================================
+ Hits 6197 6209 +12
- Misses 534 537 +3
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
189e55b
to
48d32f9
Compare
@@ -68,12 +68,6 @@ program abin | |||
write (stdout, '(A)') 'Job started at: '//trim(get_formatted_date_and_time(time_start)) | |||
write (stdout, *) '' | |||
|
|||
! LZ warning for too many states | |||
if (ipimd == 5 .and. (nsinglet_lz > 2 .or. ntriplet_lz > 2)) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this check to lz_init
@@ -68,31 +68,6 @@ subroutine write_sh_data(nstate, tocalc) | |||
close (u) | |||
end subroutine write_sh_data | |||
|
|||
subroutine write_lz_data(nstate, nsinglet, ntriplet, tocalc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to mod_lz
so that nsinglet_lz
and ntriplet_lz
can be private
@@ -177,7 +241,8 @@ subroutine lz_hop(x, y, z, vx, vy, vz, fxc, fyc, fzc, amt, dt, eclas, chpot) | |||
|
|||
do ist1 = ibeg, iend | |||
if (ist1 == ist) cycle | |||
! only closest states are considered for hopping | |||
if (ist1 == ignore_state) cycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the important bit!
if [[ -e input.in2 ]];then | ||
$ABINEXE -i input.in2 >> $ABINOUT 2>&1 || true | ||
# for testing restart, only execute if previous run did not fail | ||
if [[ -f input.in2 && $? -eq 0 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was annoying that even if a test failed, we were still running this second simulation (which is bound to fail as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, I don't see any problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a clever feature!
Another small bug (or perhaps rather a missing feature) found by Jack Taylor. Sometimes we want to calculate more electronic state (e.g. to make CASSCF more stable) but do not want to consider them in hoping algorithms. A prototypical example is simulating ethylene with SA3-CAS(2,2) starting from S1 and wanting to prevent hops to S2.
Also a minor refactoring to make more LZ stuff private to the
mod_lz
module.