adapt code to the new interface of CellListMap#257
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #257 +/- ##
==========================================
+ Coverage 65.93% 65.97% +0.04%
==========================================
Files 56 56
Lines 13150 13123 -27
==========================================
- Hits 8670 8658 -12
+ Misses 4480 4465 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @jgreener64 I think this is ready for review. One thing that called my attention, though, is that to create a Concerning the An unrelated comment: I think having this method: Line 617 in 154bd7e in the code base is dangerous, because it allows one to append a list of neighbors that was allocated internally in another function Base.append!(nl:NeighborList, nl_app::NeighborList)
for i in eachindex(nl_app)
push!(nl, nl_app.list[i])
end
return nl
endwhich avoids that possible misuse. (the use of |
…ch was not tested
|
Looks good, thanks for this. Seems like there is a test failure in test/constraints.jl. Perhaps the ambiguities around
We use this method more generally to append to neighbour lists, so I think we need it. Let me know if there are cases in the code currently where it is misused. |
|
The issue with the boundary type is that the CellListMap.ParticleSystem object is specialized for the type of unit cell (non-periodic, orthorhombic, or triclinic), with different code paths for each, performance decreasing in that order. This, it is nice to have the unit cell definition at the moment of it's construction. If not one can set it to triclinic and use the slower path in all cases. I'll expand and explore the possibilities asap. Concerning the append!, I didn't find any bug, it was me that did that and took me some time to realize what was going on. It is just a suggestion. |
…Requires CellListMap 0.10.2 for that. Make unit_cell parameter mandatory.
…ed in CellListMap
|
I'm working this still, and did some updates to CellListMap to simplify the interface here. Nevertheless, there's one thing which CellListMap deals differently, which is the fact that the definition of the unitcell is required for the setup of the We have three options:
From what I'm used, |
|
I favour option 1, best to be explicit on the Molly side. The next release will be breaking (1.0) so now is a good time.
That's right.
One advantage is that it allows different neighbour finders to have different setup arguments. That path to setup a |
…mandatory. Get D from boundary.
|
HI @jgreener64 Second attempt. :-) The only thing that is perhaps worth bringing to your particular attention is that Otherwise the interface changes are only those of the CellListMap interface. |
|
Great, thanks for this. |
Adapt the code for the interface of CellListMap 0.10.