Day 11: Bridge to Horton (Testing), Bridge to Horton 3
Continuing what I was working on yesterday, I have finished writing a sensible test for horton 2
bridge in cclib
. It basically exploits the fact that both horton 2
and cclib
can read from fchk
files generated by Gaussian. The test compares the parsed and converted values in both directions.
I have also fixed small typos to complete the bridge between horton 2
and cclib
. I then worked on to provide a similar functionality with horton 3
IOData
(sub)package. Most of the data structure stays same in the newer version, although many variables were renamed. Also, it uses some type-checking that was made available in Python 3. When cclib
also decides to move completely to Python 3, I foresee that similar type checking may be enforced in cclib
level and the checks in the bridge can be dropped.
As suggested by Dr. Langner, one of my mentors, I think it is worth considering whether it would be better to pass in ccData
object as argument for the bridge function. Although I have chosen to do so in my first version of the code, I saw that other bridge functions already available in cclib
chose to ask for each attribute of ccData
object as separate arguments. While I chose to be consistent, I see that there are some advantages of using ccData
object directly as function argument, especially in horton bridge in that some version checking and naming convention confusion can be relieved from the users. I suppose I should be able to discuss more about this in the daily session.