Pull Request №764 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/copy-ctor-drops-members
Merge: 0c38201cdcd83a9217d947a1604b4317f71c6831←fa272981f0b7f34f0077366e934d22a728d299f2
Copy missing data members in hand-written copy ctors / assignment operators
----------------
Merge commit message:
Copy missing data members in hand-written copy ctors / assignment operators
A sweep of hand-written copy constructors and copy-assignment operators
turned up 30 classes that copy most of their data members but silently
skip one or two. In each case the skipped member is configuration that
the object is expected to carry with it, not a cache or scratch state,
so the copy (usually produced by clone()) behaves differently from the
original.
Several of the skipped members have no default member initializer, so
the copy left them indeterminate rather than merely stale --
MembraneInfo::membrane_core_, BestHotspotCstMover::cb_force_constant_,
SSElementLengthFilter::threshold_, RRComparer*::absolute_threshold_,
RotamerRecovery::ignore_unrecognized_res_, CircularPermutation::ignore_chain_,
MPDockingMover::jump_num_ and SizeInSegmentsRequirement::size_.
BondedResidueSelector's copy constructor needed more than an added
initializer: it set use_input_set_selector_ and then called
set_input_set(), which resets that flag to false, so a copy of a
selector-driven instance always fell back to the (empty) input set. It
is now a plain member-wise copy.
AbrelaxApplication::trRosetta_cst_generator_ is declared under
#ifdef USE_TENSORFLOW, so its initializer carries the same guard.
Each new initializer is placed in declaration order so no -Wreorder
warning is introduced.
Detector hits that were verified as deliberate are left alone: caches and
scratch state (Energies::nblist_, RigidBodyPerturbMover::rb_delta_,
GraftSwitchMover::orig_pose_), observer links, back-pointers to an owning
object, const members that a copy-assignment cannot write (the pcs*
PseudocontactShiftData family), and classes whose copy body re-derives the
members through initialize() or a copy_* helper.
Pull Request №763 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/owning-raw-pointers-to-unique-ptr
Merge: 0c38201cdcd83a9217d947a1604b4317f71c6831←4066812b2d3eccc8fe66d5300f13054195e3fc6a
Replace manually-deleted owning raw pointers with std::unique_ptr
----------------
Merge commit message:
Replace manually-deleted owning raw pointers with std::unique_ptr
Twelve classes held a heap object by raw pointer and freed it with an
explicit delete in their destructor. Hold each in a std::unique_ptr
instead, so ownership is expressed in the type and the destructors stop
hand-managing memory.
Eight graph classes own boost::unordered_object_pool instances:
utility::graph::Graph and Digraph (element pool plus edge pool each),
EnergyGraph, MinimizationGraph, TenANeighborGraph,
BuriedUnsatPenaltyGraph, JobDigraph and SewGraph. In Graph and Digraph
this also corrects the teardown order: the explicit delete freed the
element pool from the destructor body while edge_list_ -- which holds a
reference to that pool and returns its elements to it as it is destroyed
-- was still alive. Member destruction now runs the list first and frees
the pool afterwards.
SICFast, MotifHashRigidScore, triangleIterator and FragmentCandidate
each owned a single object while leaving their copy operations implicit,
so copying any of them would have double-freed. The unique_ptr members
make them non-copyable.
MotifHashRigidScore::ssinfo1_ and ssinfo2_ were never allocated -- always
null, with their only readers commented out -- so they are deleted rather
than converted, along with the now-unused SS_Info2 includes.
Pull Request №762 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/duplicated-copy-paste-conditions
Merge: 0c38201cdcd83a9217d947a1604b4317f71c6831←375404062ef86004dfcfce5ea79ba16380ec9054
Fix copy/paste bugs in duplicated conditions
----------------
Merge commit message:
Delete unreachable duplicate PoseCoordPickMode_BB branch
xyzStripeHashPoseWithMeta::init_with_pose tested
PoseCoordPickMode_BB twice in the same if/else chain, so the second
branch could never run. Its body collects CA, C and CB, which matches no
value of PoseCoordPickMode -- N_CA_C and N_CA_C_CB both include N -- so
the intent behind it is not recoverable.
The surviving first branch is the correct one: it collects N, CA, C, O
and CB, matching both the natom counting loop above it and the
canonical case PoseCoordPickMode_BB in core/pose/xyzStripeHashPose.cc.
Removing dead code, no behaviour change.
Pull Request №762 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/fix/duplicated-copy-paste-conditions
Merge: 0c38201cdcd83a9217d947a1604b4317f71c6831←0fbeb47e0091638e54288b68e9ee0de2c22c7224
Fix copy/paste bugs in duplicated conditions
----------------
Merge commit message:
Fix copy/paste bugs in duplicated conditions
Each of these tests the same operand twice in one condition or if/else
chain, so a sibling operand is never tested and part of the check is dead.
Behaviour fixes:
* CartesianBondedEnergy: the torsion ring-atom test checked atids[2]
twice and never atids[4], so 4-atom ring torsions were not always
handed off to cart_bonded_ring.
* chemical/rna/util: in the SUGAR/SUGAR CIS base-pair table the guanine
row was labelled `aa1 == na_rad`, which the adenine row above already
matches. All four guanine branches were unreachable. They push " H22",
an atom only RGU has (RAD has " H2 "), and na_rgu was the one row
missing from the otherwise complete 4x4 table.
* DisulfideOptimizationMover: the "both residues are disulfide bonded"
check tested cys_pos[1] twice, so cys_pos[2] was never validated.
* DofUnlock: the environment-id half of the passport check compared
pass_out to itself instead of to pass_, so a mismatched environment id
was never caught.
* RotamerRecovery: runtime_assert compared pose_rots.size() to itself
instead of to nat_rots.size().
* FloppyTailMover: flexible_chain appeared twice in the list of options
that conflict with an explicit movemap, so flexible_start_resnum was
never rejected. The error message had the same duplication.
Behaviour-preserving removals of dead duplicate conditions:
* cryst/wallpaper: "C211" listed twice among the tetragonal groups.
* CDRSeqDesignOptions: "DISALLOWED" listed twice.
* SecretionPredictionFilter, SecretionOptimizationMover: the dG_ins
threshold comparison repeated in the same && chain.
Found with a new redundant-expression / branch-clone analysis pass over
utility/, basic/, core/, protocols/ and numeric/; utility/, basic/ and
numeric/ had no true positives.
Pull Request №753 RosettaCommons/rosetta/main ← roccomoretti/rosetta/bindcraft_python_test
Merge: de92a3c0dea8a010d372a22025e3e50bd4e2f33f←5ef46d681f01f3e93b561d6a1fb00f8ec3d0a0e7
Add a PyRosetta unit test for BindCraft
----------------
Merge commit message:
Fix range of interface_dG on various platforms.
Pull Request №760 RosettaCommons/rosetta/main ← RosettaCommons/rosetta/lyskov-pyrosetta-notebooks
Merge: de92a3c0dea8a010d372a22025e3e50bd4e2f33f←ccac7a38949ea97b2369d9f23309613df4206571
Add 'pyrosetta-distributed' to package list
----------------
Merge commit message:
Add 'pyrosetta-distributed' to package list
Pull Request №759 RosettaCommons/rosetta/main ← roccomoretti/rosetta/clang_23
Merge: de92a3c0dea8a010d372a22025e3e50bd4e2f33f←f9a45d834e004db67d5f0be4368086c3a68fa7f7
Fix compliation for Clang 23 and GCC 16
----------------
Merge commit message:
Clang wants to blow out the candles on GCC's birthday cake.
Pull Request №758 RosettaCommons/rosetta/main ← roccomoretti/rosetta/backrub_segfault
Merge: de92a3c0dea8a010d372a22025e3e50bd4e2f33f←2b46e950ceb9ca2b546a1d87366fcc238417b273
Fix Segfault with backrub.
----------------
Merge commit message:
Fix Segfault with backrub.
While BackrubProtocol clears the BackrubMover's segments between proteins,
the bond_angle_map_ data set by add_segment() is not.
This means that when you apply backrub to a large protein and then to a small protein,
the residue numbers from the large protein cause a segmentation fault in optimize_branch_angles()
when the residual data in bond_angle_map_ is applied to the small protein.
Pull Request №753 RosettaCommons/rosetta/main ← roccomoretti/rosetta/bindcraft_python_test
Merge: de92a3c0dea8a010d372a22025e3e50bd4e2f33f←5c10c92fe4852989385dd261fa3e516a762bc395
Add a PyRosetta unit test for BindCraft
----------------
Merge commit message:
Add a PyRosetta unit test for BindCraft
This doesn't test all of BindCraft, it just attempts to test the PyRosetta portions of it,
to make sure we don't have future regressions on the use.
One limitation is the lack of dalphaball.
Pull Request №751 RosettaCommons/rosetta/main ← klimaj/rosetta/update_pyrosetta_notebooks
Merge: fa5ce209894d40d0cb2bb6676757b7b1ce4abc87←36a3c80127d7ba51b341cf98c3a79f0b87c8e167
Update PyRosetta.notebooks submodule pointer to #117
----------------
Merge commit message:
Update PyRosetta.notebooks submodule
Pull Request №751 RosettaCommons/rosetta/main ← klimaj/rosetta/update_pyrosetta_notebooks
Merge: fa5ce209894d40d0cb2bb6676757b7b1ce4abc87←b04a17bcb150b0dfbc76d3688c0c93c268b9db61
Update PyRosetta.notebooks submodule pointer to #117
----------------
Merge commit message:
Update PyRosetta.notebooks submodule