Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

post update ibi #696

Merged
merged 15 commits into from
Aug 2, 2021
Merged

post update ibi #696

merged 15 commits into from
Aug 2, 2021

Conversation

marvinbernhardt
Copy link
Contributor

@marvinbernhardt marvinbernhardt commented Jun 23, 2021

solves #676
In fact, this could also be used to have non-bonded interactions be updated with IBI.

Aditionally I have simplified how one can exclude interactions from imc. Before you had to provide an extra settings.xml file. Now you can just set the interaction.imc.group to 'none' and it will be excluded.

I prepare a csg-tutorial for propane, where this is used to do imc for nb and ibi for bonded.

One thing that is awkward is that this post-update overwrites potential updates from other methods, but I print a warning in that case.

I have not yet changed the iie interface to use this (see line 111 in update_iie.sh) but will do so later, since I work on iie atm anyway.

@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #696 (d5b784c) into master (fd5c7df) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #696     +/-   ##
========================================
- Coverage    28.1%   28.1%   -0.1%     
========================================
  Files         133     133             
  Lines        8677    8678      +1     
========================================
- Hits         2442    2441      -1     
- Misses       6235    6237      +2     
Impacted Files Coverage Δ
src/tools/csg_stat_imc.cc 61.4% <100.0%> (-0.4%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd5c7df...d5b784c. Read the comment docs.

@junghans
Copy link
Member

@votca-bot format

@junghans
Copy link
Member

@votca-bot changelog: add ability to run ibi as a postupd method

@junghans
Copy link
Member

@marvinbernhardt I am a bit confused that this update doesn't break the spce/hncgn

2021-06-23T17:13:08.8420439Z         Start 209: regression_spce_hncgn
2021-06-23T17:13:26.6095206Z 136/159 Test #209: regression_spce_hncgn ..............................   Passed   17.77 sec

Do we need a PR in csg-tutorials as well? If so can you add the naphtalne examples as well?

@junghans
Copy link
Member

@votca-bot copyright

@marvinbernhardt
Copy link
Contributor Author

@marvinbernhardt I am a bit confused that this update doesn't break the spce/hncgn

2021-06-23T17:13:08.8420439Z         Start 209: regression_spce_hncgn
2021-06-23T17:13:26.6095206Z 136/159 Test #209: regression_spce_hncgn ..............................   Passed   17.77 sec

Do we need a PR in csg-tutorials as well? If so can you add the naphtalne examples as well?

IIE and IBI still do IBI on all bonded interactions by default I belive. Question is if we want to keep that behavior or want the user to explicitly use post_update IBI. I would say it should only be implicit for IBI itself, other methods should use post_update.

@junghans
Copy link
Member

@marvinbernhardt I am a bit confused that this update doesn't break the spce/hncgn

2021-06-23T17:13:08.8420439Z         Start 209: regression_spce_hncgn
2021-06-23T17:13:26.6095206Z 136/159 Test #209: regression_spce_hncgn ..............................   Passed   17.77 sec

Do we need a PR in csg-tutorials as well? If so can you add the naphtalne examples as well?

IIE and IBI still do IBI on all bonded interactions by default I belive. Question is if we want to keep that behavior or want the user to explicitly use post_update IBI. I would say it should only be implicit for IBI itself, other methods should use post_update.

Yeah that makes sense!

Copy link
Member

@junghans junghans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge when ready.

And update the tutorials accordingly.

@junghans
Copy link
Member

junghans commented Jul 8, 2021

ping @marvinbernhardt

@marvinbernhardt
Copy link
Contributor Author

I want to test it again with the propane system from the csg_tutorials

@@ -28,10 +28,6 @@ fi

sim_prog="$(csg_get_property cg.inverse.program)"
[[ -n $(csg_get_property --allow-empty cg.bonded.name) ]] && has_bonds=true || has_bonds=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has_bonded isn't used anywhere anymore, so remove.

@marvinbernhardt marvinbernhardt marked this pull request as ready for review July 23, 2021 13:41
@marvinbernhardt
Copy link
Contributor Author

I had to modify a perl script (update_ibi_pot.pl) to get rid of nasty artifacts in my angle potential. Now it looks much better, but the perl code is surely redundant. But I am not sure how to improve it.

@junghans
Copy link
Member

I had to modify a perl script (update_ibi_pot.pl) to get rid of nasty artifacts in my angle potential. Now it looks much better, but the perl code is surely redundant. But I am not sure how to improve it.

What were the artifacts and what is redundant?

@marvinbernhardt
Copy link
Contributor Author

I had to modify a perl script (update_ibi_pot.pl) to get rid of nasty artifacts in my angle potential. Now it looks much better, but the perl code is surely redundant. But I am not sure how to improve it.

What were the artifacts and what is redundant?

Artifacts were building up on the right side of angle potentials.
image

There is redundancy in these two for loops. Unfortunately I'm not so good at Perl.

my $value=0.0;
for (my $i=$ndx_max_rdf_cur;$i<=$#r_aim;$i++){
if (($rdf_aim[$i] > 1e-10) && ($rdf_cur[$i] > 1e-10)) {
$dpot[$i]=log($rdf_cur[$i]/$rdf_aim[$i])*$pref;
$flag[$i]="i";
} else {
$dpot[$i]=$value;
$flag[$i]="o";
}
if($pot_flags_cur[$i] =~ /[u]/) {
$dpot[$i]=$value;
$flag[$i]="o";
}
else {
$value=$dpot[$i];
}
}
# go to beginning
$value=0.0;
for (my $i=$ndx_max_rdf_cur-1;$i>=0;$i--){
if (($rdf_aim[$i] > 1e-10) && ($rdf_cur[$i] > 1e-10)) {
$dpot[$i]=log($rdf_cur[$i]/$rdf_aim[$i])*$pref;
$flag[$i]="i";
} else {
$dpot[$i]=$value;
$flag[$i]="o";
}
if($pot_flags_cur[$i] =~ /[u]/) {
$dpot[$i]=$value;
$flag[$i]="o";
}
else {
$value=$dpot[$i];
}
}

@junghans
Copy link
Member

There is redundancy in these two for loops. Unfortunately I'm not so good at Perl.

I guess you could make it in a function, but don't bother if it is too complicated.

@marvinbernhardt
Copy link
Contributor Author

I think this could be merged now.

@junghans junghans merged commit c760109 into master Aug 2, 2021
@junghans junghans deleted the marvinbernhardt-postupd-ibi branch August 2, 2021 16:40
votca-bot added a commit to votca/votca that referenced this pull request Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants