-
Notifications
You must be signed in to change notification settings - Fork 68
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
Ase interface - close #133 #136
Conversation
def get_property(self, atoms, property_name): | ||
if property_name not in self.results.keys(): | ||
def get_property(self, name, atoms=None, allow_calculation=True): | ||
if name not in self.results.keys(): |
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 PR seems to fix my issue (thanks!) but makes the code run insanely slowly compared to having trajectory=None
in my tests. I think allow_calculation
should be actually handled here the way ASE does it:
if name not in self.results.keys(): | |
if name not in self.results.keys(): | |
if not allow_calculation: | |
return None |
⇒ Fast again
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.
Thanks for finding this issue and giving the suggestion. A new commit has been made on this allow_calculation
change.
Codecov Report
@@ Coverage Diff @@
## master #136 +/- ##
=========================================
+ Coverage 59.29% 59.3% +0.01%
=========================================
Files 31 31
Lines 4761 4760 -1
=========================================
Hits 2823 2823
+ Misses 1938 1937 -1
Continue to review full report at Codecov.
|
Thanks again for fixing this, I think there is one more issue with this PR: The resulting trajectory file has about twice as many frames as there were MD steps - I guess this is because, as far as I understand, |
Thanks for pointing out this. Actually we were not using ASE trajectory for doing things, so we did not consider the compatibility with it. Since we have our own I will open a new issue for this enhancement, i.e. to make our log file better compatible with ASE primitive log files, or even merge some of them. For your ASE trajectory file, a temporary solution is to remove the DFT frames in post processing. You can look at the folder For example, in the toy example you gave (in #133 ), you can run the following to remove the DFT frames in your trajectory file (the
Let me know if you find any other issues |
@YuuuuXie Thanks a lot for going to the trouble of writing a workaround! I'll use this for the time being. Making FLARE's OTF-MD stuff behave more like ASE's MD classes in general would be great, too, of course. |
fixed the ASE logger issue reported in #133