Closed kyleabeauchamp closed 10 years ago
PS: here's what the top-level namespace currently looks like:
In [1]: import testsystems
In [2]: testsystems.
testsystems.AlanineDipeptideExplicit testsystems.Diatom testsystems.LennardJonesFluid testsystems.SrcExplicit
testsystems.AlanineDipeptideImplicit testsystems.HarmonicOscillator testsystems.LysozymeImplicit testsystems.SrcImplicit
testsystems.ConstraintCoupledHarmonicOscillator testsystems.HarmonicOscillatorArray testsystems.MethanolBox testsystems.systems
testsystems.CustomGBForceSystem testsystems.IdealGas testsystems.MolecularIdealGas testsystems.WaterBox
testsystems.CustomLennardJonesFluid testsystems.LennardJonesCluster testsystems.SodiumChlorideCrystal
OK this PR now properly installs each of the data directories when you run setup.py install
Whoa, I totally missed this. Looks like yours works, mine doesn't. OK to merge yours.
Let me look over your PR and integrate the remaining differences...
PS this is what it feels like working with Robert--he's always 1 hour ahead of you...
PS this is what it feels like working with Robert--he's always 1 hour ahead of you...
As they say, "a version control system is not a substitute for developer communication". :)
OK I just added in the other changes you had made in your PR--mainly the n_atoms sanity check for XML. I think you can start taking a look at this PR now.
Looks good to merge.
My only question for the future is whether we want to specifically list all of the imported TestSystem
derived classes in __init__.py
, since that might get hairy if we add more. Or is this desirable behavior, since it lets us remove experimental test systems from the official imports?
So I could have done from systems import *
, but that adds all the extra global "junk" that is present in the global namespace of systems.py
. The selective import let's us keep things clean. Either way is fine, though.
This is a first pass at exposing the important classes at the topmost package level. I will file a corresponding PR in Yank that uses this interface.