-
Notifications
You must be signed in to change notification settings - Fork 72
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 #77
Ase interface #77
Conversation
flare/ase/calculator.py
Outdated
res.append(predict_on_atom((structure, atom, gp_model))) | ||
return res | ||
|
||
def predict_on_structure_en(strucutre, gp_model): |
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.
Input should be "structure"
flare/ase/calculator.py
Outdated
|
||
self.mgp_model = MappedGaussianProcess(self.gp_model, grid_params, struc_params) | ||
|
||
def predict_on_atom(params): |
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.
These functions look pretty similar to the ones in predict.py, would it be possible to use those so that we don't repeat code?
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.
Good idea. I'll make the change
@@ -18,7 +17,7 @@ | |||
qe_input_to_structure, parse_qe_forces | |||
from flare import output | |||
|
|||
class MFFOTF(OTF): | |||
class MGPOTF(OTF): |
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.
We now have three otf.py files in the repo -- mgp/otf, which inherits from flare/otf, and ase/otf, which is separate. If there are common methods to all three, we should try to import them from one place to minimize duplication.
Jon: We now have three otf.py files in the repo -- mgp/otf, which inherits from flare/otf, and ase/otf, which is separate. If there are common methods to all three, we should try to import them from one place to minimize duplication. |
One common method that can be extracted out is |
Yeah, is_std_in_bound would be good to have in one place (#30). We can either move it out of class in otf.py, or put it in predict.py. |
I can also have ase/otf to inherit from OTF somehow, since there're a lot of common attributes. Could we probably put |
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.
Oh I used to use the same dir as you do (../test_files/pseudos) and never passed TRAVIS test. Then Lixin figured out TRAVIS did its unit test in the tests
folder, so it runs python test_ase_setup/test_ase_otf.py
. That's why I changed it to test_files/pseudos and then it passed unit test
flare/ase/calculator.py
Outdated
|
||
self.mgp_model = MappedGaussianProcess(self.gp_model, grid_params, struc_params) | ||
|
||
def predict_on_atom(params): |
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.
Good idea. I'll make the change
Good catch. The test failed on my machine, but that's because I was running a different command than Travis. I switched it back. |
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
===========================================
+ Coverage 41.19% 51.97% +10.77%
===========================================
Files 29 29
Lines 4954 4839 -115
===========================================
+ Hits 2041 2515 +474
+ Misses 2913 2324 -589
Continue to review full report at Codecov.
|
Re: Travis testing directory. I set Travis to run its tests from the tests directory. When I try to run pytest from the base directory, I get a lot of errors from trying to locate |
I also tried running |
The latest commits removed the predict functions in ase/otf.py, and uses predict.py. Also removed |
ase*.py
in flare folderase
module includes flare calculator, otf engine and loggerotf_md.py
, unit test:test_ase_setup/test_ase_otf.py
with QE).rst
formgp
andase
in docs folder*.out
in tests folder since they are not used