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
Use adaptive OneDMin radii #131
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
+ Coverage 42.63% 43.13% +0.49%
==========================================
Files 27 27
Lines 6105 6192 +87
Branches 1578 1597 +19
==========================================
+ Hits 2603 2671 +68
- Misses 3120 3131 +11
- Partials 382 390 +8
Continue to review full report at Codecov.
|
@@ -1041,6 +1042,42 @@ def set_transport_data(self, lj_path, opt_path, bath_gas, opt_level, freq_path=' | |||
comment=str(comment) | |||
) | |||
|
|||
def determine_radius(self): |
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.
Does the xyz used in ARC have a center of mass at 0,0,0? If not, this method can easily overestimate the radius.
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.
I think this should be the center of geometry, not of mass, right? I.e., not weighting atom numbers in the average
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.
I am not entirely sure what the best way to do this should be. Jasper 2014 describes
arc/species/species.py
Outdated
'H2': 1.70, 'N2': 1.95, 'O2': 1.88} # in Angstrom | ||
bath_gas_r = int(math.ceil(bath_gas_radii_dict[bath_gas])) | ||
species_radius = int(math.ceil(self.determine_radius())) | ||
r_min = species_radius + bath_gas_r |
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.
I think this might be an overestimate, since the minimum radius could fall below this value.
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.
Taking the max distance is likely to be an overestimate. Since we are taking the max distance in the previous one, maybe this would work better as r_max instead of r_min
arc/species/speciesTest.py
Outdated
bath_gases = ['H2', 'N2', 'Ar', 'H2'] | ||
expected_rs = [(3, 6), (4, 7), (4, 7), (3, 6)] | ||
for i, spc in enumerate([self.spc2, self.spc6, self.spc8, self.spc9]): | ||
self.assertEqual(spc.determine_onedmin_radii(bath_gas=bath_gases[i]), expected_rs[i]) |
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.
A more robust test might ensure that the actual radius that 1dmin would predict falls within the range arkane guesses.
Though even if it is within the range but near the edge, 1dmin can fail. That's what happened with my ibutanol peroxy, which eventually obtained a radius of 4.6 but failed when the range was 2-5.
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.
I like the code structure which gives the ability to estimate the range based on the coordinates. I have some questions, which are discussed partially in the comments.
I added the isobutane peroxy radical (with the mass center manually adjusted to 0,0,0) in N2, which I have gotten to run in 1dmin giving a radius of 4.6, the test methods and ran it to see the range that the method gave (you can see it here. The method gave 6 and 9 as r_min and r_max respectively, which above the value estimated by r_min and r_max
- Are the xyz's necesarilly centered around the center of mass? if not, it would be helpful to have a centering method since that is how 1dmin calculates radius.
- Have the ranges presented in the test method worked when the molecules are put into 1dmin? If not, either you or I should run them to make sure they work (also see comment which could improve robustness of test)
- One idea might be to set the r_max to the combined max radius of both molecules found in ARC and r_min to 3 smaller than that (with 1-4 or 2-5 being the minimum radius allowed). This might work for medium sized things like the butanol peroxy. Not sure what the maximum size might be.
Thanks for the comments! |
arc/species/species.py
Outdated
r_min = species_radius + bath_gas_r | ||
bath_gas_r = bath_gas_radii_dict[bath_gas] | ||
species_radius = self.determine_radius() | ||
r_min = species_radius + bath_gas_r + 0.2 |
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.
One question I have is why add 0.2 A to the minimum radius.
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.
At least with the older algorithm using ibutanol peroxy as a test case, the radius given by the method appeared to be an over estimate, such that I think
r_max = max((species_radius + bath_gas_r, 4.5))
r_min = species_radius - 3
would lead to more successful calculations than the other algorithm.
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.
I think we don't have the same definition to r_max
. I think r_max is the farthest point the bath gas is at from the axis origin, so it cannot be species_radius + bath_gas_r
, because for a spherical species this will put the bath gas right at the edge of the sphere, which is r_min
I removed the xyz centring function, following the e-mail conversation with Ahren. I assume that the xyz is centered around the center of mass, which is the case for ESS output. |
d49af4c
to
aacb7f1
Compare
054d8aa
to
87710c1
Compare
Also added a memory attribute to OneDMin
If it is set to True in the job_types dict, and the species is not a TS and has final_xyz
Assuming the species is sphere-like, determine the r_min and r_max radii to use for a OneDMin L-J calculation.
Addresses #129