Pull Request №708 RosettaCommons/rosetta/main ← klimaj/rosetta/test_builds
Merge: 91e8dceb14197d722d77bbb2030a7a0240653d86←0cf5cafd81bb20dcb70d1c230245bbd8ad71d0e1
Testing Pose bindings/numeric unit tests with standard PyRosetta builds
----------------
Merge commit message:
Remove duplicate tests; exit if numpy is not installed
Pull Request №707 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/off-by-one-1-indexed-loops-batch
Merge: 91e8dceb14197d722d77bbb2030a7a0240653d86←9f26b0468d3e771e44a89a18f0aeee8e42457326
Fix off-by-one loops over 1-indexed residue/atom/element ranges
----------------
Merge commit message:
Fix off-by-one loops over 1-indexed residue/atom/element ranges
Replace `i < container.size()` with `i <= container.size()` (or the
matching `i < pose.size()` -> `i <= pose.size()`) across 35 loops where
the body uses `i` as a direct 1-indexed element accessor
(`pose.residue(i)`, `vec[i]`, etc.) — so the last residue/atom/element
was silently being skipped.
Also fixes two related copy-paste bugs in pose_sewing that surfaced
during the audit: the distance check `pose.residue(upstream_res).xyz(2)
.distance(pose.residue(upstream_res).xyz(2))` was self-distance (always
zero, condition always satisfied) — should compare upstream vs
downstream residue xyz. Affects helix_pair detection in
BlockwiseAnalysisMover and OmnibusDisulfideAnalysisLabelerMover.
Skipped candidates: loops with pair access `[i+1]` (correct stop at
size-1), cutpoint-style "between residues" loops, MEM-chain-skipping
loops in protocols/membrane, separator-style "all-but-last + last raw"
patterns, suite/connection enumerations (N-1 connections for N
segments), and commented-out code.
Pull Request №692 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/utility-iterator-rule-of-zero
Merge: 80efd178b93d19b7cb76d9a0b34788104381afaa←44a614b5bac4fa3cef17fcdfc514da8e1240e8da
Apply Rule of Zero across utility/ helpers
----------------
Merge commit message:
Suppress cppcheck false positive on UpperEdgeGraph private helpers
UpperEdgeGraph::get_vertex_ptr and ::note_edge_deleted are called from
the friend class UEEdge (constructors at lines 314/315/325/326 and
delete_edge at line 342), but cppcheck does not trace template friend
usage and flags them as unusedPrivateFunction.
Pull Request №706 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/core-empty-dtors-rule-of-zero
Merge: b2a0ff32f3ee01822f6f18b9d21ea27357a5f6bc←b9ffb8f38f6f8ae2fd2a072786cb3c81bfd4901f
Apply Rule of Zero to empty destructors across core/
----------------
Merge commit message:
Apply Rule of Zero to empty destructors across core/
Move trivially empty or `= default;`-bodied destructors from .cc files to
header declarations using `= default`, then remove the now-redundant .cc
implementations. Where a destructor was declared `~X() {}` inline in a
header, switch it to `~X() = default;` for the same reason.
Affected sibling groups:
- core/conformation/membrane/* and membrane_geometry/* (8 classes)
- core/conformation/parametric/*ValuedParameter (5 classes)
- core/io/silent/SilentFileData iterator and const_iterator
- core/pack/interaction_graph/RotamerDots family (4 classes)
- core/scoring/etable/EtableEvaluator hierarchy (3 classes)
- core/scoring/hbonds/graph/HBondInfo (2 classes)
- core/scoring/nmr/NMRDummySpinlabelVoxelGrid family (4 classes)
- core/scoring/sc/MolecularSurfaceCalculator::Atom
- core/energy_methods/SAXSEnergy
Pull Request №705 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/key-containers-rule-of-zero-redo
Merge: b2a0ff32f3ee01822f6f18b9d21ea27357a5f6bc←f7927e886605c9074a69feb917a084fac42262d8
Apply Rule of Zero to utility/keys container family (corrected)
----------------
Merge commit message:
Apply Rule of Zero to utility/keys container family
Applies Rule of Zero to five sibling key-container templates in
`source/src/utility/keys/`:
- `ClassKeyMap`
- `ClassKeyVector`
- `KeyVector`
- `SmallKeyMap`
- `SmallKeyVector`
Each held only standard-container value-type members (a `Vector`,
plus an `IndexMap` and a scalar `Index u_` in the `Small*` variants).
Their user-declared destructors (empty body or `= default`), copy
constructors, and copy-assignment operators were byte-for-byte
equivalent to the implicit defaults the compiler would synthesize,
so they were redundant.
Removing them lets the implicitly defaulted special-member-functions
take over and, as a side effect, restores the implicit move
constructor and move assignment that were previously suppressed by
the user-declared copy operations.
Explicit `= default` default constructors are kept on all five
classes. `SmallKeyMap` / `SmallKeyVector` need a user-defined default
constructor to value-initialize the scalar `Index u_`, which an
implicit default would leave indeterminate. `ClassKeyMap` /
`ClassKeyVector` / `KeyVector` need an explicit `= default` because
each has a user-declared (non-default) constructor (iterator-range
or size/value), and a class with any user-declared constructor does
not get an implicitly synthesized default. The previous attempt at
this refactor (#691, reverted by #703) dropped these `= default`
defaults on the assumption that they would be synthesized
implicitly, which broke `ClassKeyMap m;` in test/utility/keys/
ClassKeyMap.cxxtest.hh. Keeping the explicit defaults preserves the
original API while still letting copy / move / destructor be
implicit. Supersedes #704.
Pull Request №701 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/audit-comparison-and-off-by-one
Merge: dc594471462f126ea60fc1148900ed66e5b77e44←b2883867f98b1a2e01669b1ea8b4321551565904
Fix correctness bugs: broken operator< and off-by-one residue loops
----------------
Merge commit message:
Fix correctness bugs: broken operator< and off-by-one residue loops
Two unrelated families of correctness bugs found by an audit pass.
Continues the patterns from #696 (broken comparison operators) and
#695 (off-by-one residue loops).
Broken operator< implementations (violate strict weak ordering):
* core/environment/LocalPosition.cc: assigned the signed result of
std::string::compare() to the unsigned alias Size, so any
"this->label_ < other.label_" case wrapped to a huge value and the
cmp > 0 branch fired. On top of that, the cmp > 0 branch itself
was inverted relative to "less than". Combined effect: for any
two LocalPositions with distinct labels, both a < b and b < a
returned true. The class is used as the key of
std::map<LocalPosition, core::Real> in CutBiasClaim. Replaced
with std::tie lexicographic compare.
* protocols/environment/claims/ClaimStrength.cc: every comparison
operand was reversed, so operator<(*this, other) returned true
exactly when *this was lexicographically greater than other --
the operator was fully inverted relative to its name and to
operator==. Replaced with std::tie lexicographic compare.
Off-by-one loops over 1-indexed residue / vector1 ranges:
* protocols/simple_moves/ExplicitWaterMover.cc get_water_recovery:
four loops using i < pose.total_residue() (and i < vec.size()
on utility::vector1<>, which is 1-indexed). The last residue and
last vector element were skipped, so water-recovery counts and
the per-water coordinate lists silently dropped the final entry.
* protocols/ligand_docking/GALigandDock/GALigandDock.cc
calculate_free_ligand_score: the loop adding CoordinateConstraints
to anchor every atom used ires < pose->total_residue(), so the
last residue's atoms were not constrained.
* protocols/membrane_benchmark/MembraneEnergyLandscapeSampler.cc
count_res / count_diff: both helpers walked
ii < pose.total_residue(), so a matching last residue was never
counted and a differing last residue's mismatch was never
reported.
Pull Request №700 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/core-private-unimpl-copy-modernization
Merge: dc594471462f126ea60fc1148900ed66e5b77e44←ff37fbbb56e33fdf9b332f6757faaef2bb50e2c6
Modernize pre-C++11 copy prevention to = delete across core/ and protocols/
----------------
Merge commit message:
Modernize pre-C++11 copy prevention to = delete across core/ and protocols/
Replace the pre-C++11 idiom (private undefined copy ctor / copy assignment to
prevent copies via link error) with explicit `= delete` for clearer diagnostics
and compile-time enforcement. 16 files; no behaviour change.
Two flavours:
1. Stand-alone non-copyable classes: replace the unimplemented private
declarations with `= delete`. Drops redundant comments ("deny use of the
copy constructor", "private and unimplemented", etc.) that are now
self-evident from `= delete`. Keeps explanatory comments where the *why*
is non-obvious (ScoreFunction / DockingScoreFunction / OtherContextScoreFunction:
"copying discards subclass information; use clone() instead").
2. Singleton (SymDofMoverSampler, inheriting utility::SingletonBase): drop
the redundant copy/assignment declarations entirely — the base already
`= delete`s its own copies, which transitively makes the derived
implicit copies deleted.
Files: ScoreFunction, MinScoreScoreFunction, DockingScoreFunction,
OtherContextScoreFunction, RotamerSet, RotamerSet_, RotamerSubset, RotamerSetBase,
DofPassport, ConstantLengthFragSetIterator_, FrameListIterator_,
MinimalFragSetIterator_, OrderedFragSetIterator_, FragmentPicker (QuotaDebug),
SymDofMoverSampler, FileSystemResourceLocator (FileStream).
Debug build passes clean.
Pull Request №699 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/lr-energy-container-iterators-rule-of-zero
Merge: 708ccac488292139132ec4853814381fb0bdd6ae←4bf6498bfe1e1ad5d8520a2090d1c5deb6823496
Apply Rule of Zero to remaining LREnergyContainer iterator subclasses
----------------
Merge commit message:
Apply Rule of Zero to remaining LREnergyContainer iterator subclasses
Extends the disulfide-iterator pattern (PR #689) to the four remaining
ResidueNeighbor{,Const}Iterator subclasses:
- DenseNeighbor{,Const}Iterator
- OneToAllNeighbor{,Const}Iterator
- PolymerBondedNeighbor{,Const}Iterator
- CstResNeighb{,Const}Iterator
For each: drop the empty `= default` destructor pair (override decl in .hh,
out-of-line definition in .cc), and replace the pre-C++11 private undefined
copy-assignment with an explicit `= delete` plus a comment explaining that
all assignment must funnel through the polymorphic operator= so derived
state is downcast and copied correctly.
This exhausts the LREnergyContainer iterator family; together with PR #689
all six concrete container's iterator pairs use the same idiom.