-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
VASP forces from OUTCAR #573
Conversation
Thanks for this @tfrederiksen! I think we need to conform to the idea that Perhaps we should have a method |
OK, for me it would be fine to rename the current function to Note that the relevant block(s) in the OUTCAR contains both positions and forces, so it is basically for free to return both. |
Yes, lets do something like this. What should we name it? Ideas:
In any case I think we should return a steps = PropertyDict()
steps.geometries = GeometryCollection(geometries)
steps.forces = Collection(forces)
return steps The advantage is that future additions can be done without disrupting code, i.e. some codes can return
|
I prefer the wording I like the suggestion of a def read_trajectory(all=False):
...
trajectory = PropertyDict()
if all:
trajectory.xyz = Collection(xyz)
trajectory.force = Collection(force)
trajectory.cell = Collection(cell)
else:
trajectory.xyz = xyz
trajectory.force = force
trajectory.cell = cell
return trajectory I note that sisl generally uses the singular form ( |
Ok, lets do that then. Later when/if we can parse the data for the chemical species, we can add a |
It would of course be easy with the OUTCAR basepath to also read a POSCAR for the chemical species. But opening another file internally in this function seems a bit messy, or? |
I have done this for e.g. the fdf file. If they are present, then it would be ok. Better to have consistent data. But then we shouldn't read the geometry, only the atomic information. |
OK, I'll give it a try when I find time. |
Maybe this has been discussed elsewhere, but couldn't the geometry class not optionally hold info about forces, strain, velocities, constraints, etc? |
This issue is tracked in #11 I have yet to find a stable solution that also works when manipulating the geometry. For instance, what would happen if one translates a subset of the coordinates, does it make sense to remove the forces (etc) or what should it do. But we should continue the discussion in #11 |
Codecov Report
@@ Coverage Diff @@
## main #573 +/- ##
=======================================
Coverage 87.28% 87.29%
=======================================
Files 375 375
Lines 47564 47615 +51
=======================================
+ Hits 41518 41565 +47
- Misses 6046 6050 +4
|
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 @tfrederiksen! Some comments and improvements are needed.
8e52657
to
d269e81
Compare
@zerothi , the errors exposed above in the test runs seem unrelated to this branch. |
yeah, I need to check exactly why, I couldn't reproduce on my box, so I'll have another look when I have the time. |
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.
minor details
Nothing fancy, but this PR enables users to read atomic positions and forces from VASP (eg., in a relaxation run) from the OUTCAR file
CHANGELOG