-
Notifications
You must be signed in to change notification settings - Fork 71
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
Added draft of vasp_util.py for VASP trajectories and OTF #82
Conversation
…ite and check unit tests
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
+ Coverage 50.97% 51.74% +0.76%
==========================================
Files 29 31 +2
Lines 4716 4791 +75
==========================================
+ Hits 2404 2479 +75
Misses 2312 2312
Continue to review full report at Codecov.
|
Will throw in some more comments later, but looks good so far! |
This should be ready to go now. |
Parse the DFT input in a directory. | ||
:param vasp_input: directory of vasp input | ||
""" | ||
return Structure.from_pmg_structure(Poscar.from_file(poscar).structure) |
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.
Can you ensure that this returns the cartesian coordinates every time since that's the FLARE convention?
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 addressed by the unit test for the from_pmg_structure function, but I also will address it in the test_structure_parsing
function when I assert the correct coordinate parsing
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.
Actually, test_struc.test_from_pmg_structure
doesn't guarantee the cartesian coordinates are read because it sets the unit cell to np.eye(3). So I copy-pasted the test and changed the lattice parameters so that it will fail if from_pmg_structure
returns fractional coordinates.
This looks great, Kyle! Can you address the two points above: 1. a small addition to the unit test, and 2. A guarantee that wherever in the code a FLARE structure is produced that the cartesian coordinates are returned? |
Closes #87 |
…ure to ensure Cartesian coordinates are read in
Okay, this is good to go now. Merging with master. |
The new vasp_util.py file can edit VASP POSCAR files with new coordinates, read forces from a static calculation, and read trajectories from an ionic relaxation/MD calculation. This is a draft; I still need to write unit tests and documentation.