-
Notifications
You must be signed in to change notification settings - Fork 31
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
Read parameters from the input file #125
Read parameters from the input file #125
Conversation
I recall our discussions about this feature from the MQM conference this summer. While I welcome this expanded functionality, I'm not sure that it makes sense to attach it to a new keyword. An alternative approach would be to have the |
That totally makes sense. I was having trouble getting started and only made progress after starting with a new keyword, but I agree that it's not necessary in hindsight. I can also try to work on it if you want, but I would definitely welcome you merging them back together as well. |
Since this is your contribution, it would probably be best if you handle the merging of Also, this new feature will add yet another possible data block after the geometry information in the input file. There are several other keywords that already do this ( |
Sounds good, I will take a shot at that today. I did wonder about adding another block at the end of the file. Originally I even tried including all of the parameters as the "filename" following On the other hand, I could try adding test cases combining these keywords if you wanted, depending on how many there are. From the documentation, I think |
On a related note, is there a way to run a subset of the tests? Some of the tests take a bit longer than I would like on my laptop, and I haven't figured out yet how to run only some of them. As you probably saw from my issue yesterday, I'm not familiar with cmake, although it looks very cool so far. |
Data blocks from older features in MOPAC do not have delimiters, which is what makes the parsing complicated. I'm trying to preserve backwards compatibility as much as possible, so I'd strongly prefer not to change the behavior of old keywords. However, in adding a new data block to the input file, there is nothing stopping you from adding a delimiter, which would certainly be for the better. Since you are merging this with the CTest does have various filters on tests, so you can certainly use it to run only a subset of tests. The one wrinkle is that the number labeling each test isn't considered to be meaningful, so the tests are only filterable by their names. |
Thanks for the ctest help! I just added a commit merging I'm also a bit stuck on how to fix the weird character in the |
Codecov Report
@@ Coverage Diff @@
## main #125 +/- ##
==========================================
+ Coverage 66.46% 66.67% +0.20%
==========================================
Files 331 331
Lines 73723 73736 +13
==========================================
+ Hits 49001 49162 +161
+ Misses 24722 24574 -148
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
I needed to make some changes, but everything looks reasonable now. The datin
changes are a little ugly (i.e. use of goto), but input parsing in MOPAC is already an ugly mess, so this is consistent with the status quo.
Thanks for cleaning it up, and for your help! Sorry about the gotos, I had never seen cycle or exit in the old code I've worked on, but they could probably be replaced with that if you prefer. |
No problem, and thanks for your patience in my delays in getting to this PR review. I'm fine with things like |
This PR introduces the
INTERNAL
keyword, which is similar to theEXTERNAL
keyword, except it looks for a secondINTERNAL
in the input file and reads the parameters from there instead of an external file.I also added a test for the
EXTERNAL
keyword itself and for the newINTERNAL
keyword with the same parameters.Status
The main issue I see is that it would be nice to factor out the commonality between
datin
anddatex
(that name might need to be changed too), but for now I just copy-pasteddatin
and made the changes I needed.