Closed flongford closed 4 years ago
Merging #30 into master will increase coverage by
<.01%
. The diff coverage is98.76%
.
@@ Coverage Diff @@
## master #30 +/- ##
==========================================
+ Coverage 98.7% 98.71% +<.01%
==========================================
Files 65 72 +7
Lines 2170 2249 +79
Branches 138 158 +20
==========================================
+ Hits 2142 2220 +78
- Misses 16 17 +1
Partials 12 12
Impacted Files | Coverage Δ | |
---|---|---|
force_gromacs/io/gromacs_coordinate_reader.py | 95.08% <100%> (+0.16%) |
:arrow_up: |
...ources/molecule/tests/test_molecule_data_source.py | 100% <100%> (ø) |
:arrow_up: |
force_gromacs/chemicals/tests/test_molecule.py | 100% <100%> (ø) |
:arrow_up: |
force_gromacs/chemicals/gromacs_particle.py | 100% <100%> (ø) |
|
...ources/fragment/tests/test_fragment_data_source.py | 100% <100%> (ø) |
:arrow_up: |
...macs/data_sources/fragment/fragment_data_source.py | 100% <100%> (ø) |
:arrow_up: |
force_gromacs/chemicals/i_particle.py | 100% <100%> (ø) |
|
...macs/data_sources/molecule/molecule_data_source.py | 100% <100%> (ø) |
:arrow_up: |
...e_gromacs/io/tests/test_gromacs_topology_writer.py | 100% <100%> (ø) |
:arrow_up: |
...ation_builders/tests/test_gromacs_topology_data.py | 100% <100%> (ø) |
:arrow_up: |
... and 24 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 688677e...2b10ca8. Read the comment docs.
This PR takes further steps towards introducing generic chemical objects described in #26 , following on from #27. We now introduce several interface / base classes that can be used as a general representation of a single or collection of particles:
IParticle
: an interface for a single particle objectIParticleGroup
: an interface for a collection of particles, inherits fromIParticle
so that we can describe a collection of particles as a reduced representationBaseParticleGroup
: a base class that fulfils the fulfilling theIParticleGroup
interface.Consequently, the following refactoring has taken place:
IFragment
has been refactored to inherit fromIParticleGroup
GromacsParticle
class provides interface toIParticle
GromacsFragment
class now inherits fromBaseParticleGroup
and represents a collection ofGromacsParticles
GromacsFragment
now happens upon instantiation, rather than during assignment of thetopology
attributeGromacsTopologyReader
has been renamedGromacsMoleculeReader
(since technically.itp
files are known as 'molecule' files), and now returns a list ofGromacsFragments
instances from theread
method.Additional changes include
BaseFileReader
class now has_comment
attribute, and_remove_comments
methods, since these objects are shared between multiple subclassesforce_gromacs/tests/fixtures
directory, which can now be used for unit testingforce_gromacs.chemicals
module