Conversation
| ligand_index = i; | ||
| } | ||
| } | ||
| core::conformation::Residue original_ligand(pose.residue(ligand_index)); |
There was a problem hiding this comment.
Prefer using a ResidueOP and .clone() to make a copy. I don't think it makes a difference here, but it does in other contexts where there's multiple derived types, it plays better with subtypes (the approach here would lose subtype info.)
| for ( core::Size atomno = 1; atomno <= start.natoms(); ++atomno ) { | ||
| total_distance += start[atomno].distance(current[atomno]); | ||
| } | ||
| core::Real rmsd = core::scoring::automorphic_rmsd( *start.residue(), *current.residue(), /*superimpose=*/false ); |
There was a problem hiding this comment.
Part of the purpose of UltraLightResidue is to not have to update the coordinates of the underlying conformation::Residue and take the overhead of that. As such, the residue() coordinates are set at initialization and not updated -- your change here isn't doing what you want it to (it's using stale coordinates).
| if ( residue.is_ligand() ) { | ||
| ligand_index = i; |
There was a problem hiding this comment.
There can theoretically be multiple ligands in the pose, only one of which (not necessarily the last) is the one which is being modified. Unfortunately, things are indirect enough that I don't think there's a good way of getting just the primary ligand from the info provided, so there likely isn't a need to change things. Just make sure to document the issue thoroughly. -- Though I might suggest breaking this out into a private function, which might make updating things later easier.
This PR does two things:
Both changes are useful to limit docking exploration during execution towards the starting position and enforces local refinements.