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
Improvements to readCFG.m and writeCFG.m #32
Conversation
jat255
commented
Nov 19, 2014
- Fixed readCFG.m to correctly read CFG files. Now reads whole line (including DW factors, occ., and charge)
- Fixed writeCFG.m, which was writing the unit vectors in the wrong orientation (relative to readCFG.m). It now writes a file identical to what is read in with readCFG (in my testing)
- this was causing unit vectors to be transposed, when reading a .cfg in with readCFG.m and then trying to write it with writeCFG.m
- writeCFG also now explicitly writes the occupancy and everything, which allows it to write a full .cfg file.
- This may need to be changed in other places throughout the code, as it appears there are a number of places where writeCFG is embedded inside other scripts.
- Fixed the call to readCFG inside of drawCFG, which caused it not to work.
- Updated .gitignore to ignore Matlab Editor autosave files
…cluding DW factors, occ., and charge) Fixed writeCFG.m, which was writing the unit vectors in the wrong orientation (relative to readCFG.m). It now writes a file identical to what is read in with readCFG (in my testing) writeCFG also now explicitly writes the occupancy and everything, which allows it to write a full .cfg file. This may need to be changed in other places throughout the code, as it appears there are a number of places where writeCFG is embedded inside other scripts. Fixed the call to readCFG inside of drawCFG, which caused it not to work. Updated .gitignore to ignore Matlab Editor autosave files
@robbmcleod Can you comment on this, since it's your code being modified? It look good to me, but I don't run Matlab. |
I don't see why not. I'll try to test the textscan call to make sure it's working properly, but based on code inspection I see nothing wrong. One issue though is that I don't believe the atomic charge is implemented in a way that's physical? There are some comments by Christoph to this effect. |
If it helps, I would say the most critical fixes were:
|
Sorry, still learning my way through git. I put some changes for a separate pull request on this branch, but now I think I've successfully reverted them, so this branch should only contain the changes mentioned above. The other pull request for the convert2cfg.m script is here. |
Thanks for the clarification. I'm not concerned about the non-physicality of charge calculations, at least not regarding this commit. In my opinion, that's a separate issue: each part of the code should be as correct and complete as possible. The file reading/writing should maintain the charge information and everything possible, and the rest of the code needs fixing if charge effects are incorrect. |
Improvements to readCFG.m and writeCFG.m