31 #include <basic/Tracer.hh>
42 #include <utility/vector1.hh>
47 namespace downstream {
49 static basic::Tracer
TR(
"protocols.match.downstream.RigidLigandBuilder" );
53 ignore_h_collisions_( false )
60 downstream_restype_( other.downstream_restype_ ),
61 upstream_restype_( other.upstream_restype_ ),
62 ignore_h_collisions_( other.ignore_h_collisions_ ),
63 orientation_atoms_( other.orientation_atoms_ ),
64 atoms_123_( other.atoms_123_ ),
65 radii_123_( other.radii_123_ ),
66 atom_radii_( other.atom_radii_ ),
67 atom_required_in_active_site_( other.atom_required_in_active_site_ ),
68 non_collision_detection_atoms_reqd_in_active_site_( other.non_collision_detection_atoms_reqd_in_active_site_ ),
69 lig_conformers_( other.lig_conformers_.
size() ),
70 min_sep_d2_from_upstream_atoms_( other.min_sep_d2_from_upstream_atoms_ )
107 HTReal const & atom3_frame,
108 Size const scaffold_build_point_id,
109 Size const upstream_conf_id,
110 Size const external_geometry_id,
119 std::list< Hit > hitlist;
180 hit.
first()[ 1 ] = scaffold_build_point_id;
181 hit.
first()[ 2 ] = upstream_conf_id;
182 hit.
first()[ 3 ] = external_geometry_id;
183 hit.
first()[ 4 ] = 1;
184 hit.
second() = global_coordinate;
187 hitlist.push_back( hit );
207 Hit const & other_hit,
211 return other.
compatible( other_hit, *
this, my_hit,
false );
233 runtime_assert(
id.rsd() == 1 );
235 if (
lig_conformers_[1]->restype_id_2_collision_check_id(
id.atomno() ) == 0 ) {
239 for (
Size ii = 1; ii <= 3; ++ii ) {
342 for (
Size ii = 1; ii <= lig_res.
natoms(); ++ii ) {
347 pose->append_residue_by_jump( lig_res, 1 );
351 pose->pdb_info( pdbinf );
352 pose->pdb_info()->chain( 1,
'X' );
371 Size orientation_atom1,
372 Size orientation_atom2,
373 Size orientation_atom3,
387 utility_exit_with_message(
"ERROR in RigidLigandBuilder: cannot build a residue with fewer than three atoms" );
393 for (
Size ii = 1; ii <= natoms; ++ii ) {
400 orientation_atom1, orientation_atom2, orientation_atom3, residue );
402 for (
Size ii = 1; ii <= 3; ++ii ) {
418 assert( upstream_res );
430 Size n_to_count( 0 );
435 if ( ! count_pair || ( count_pair->count( jj, ii_restype_id, weight, path_dist ) && weight == 1.0 ) ) {
448 if ( count_pair && ( ! count_pair->count( jj, ii_restype_id, weight, path_dist ) || weight != 1.0 )) {
459 if ( ! count_pair || ( count_pair->count( jj, ii_restype_id, weight, path_dist ) && weight == 1.0 ) ) {
467 for (
Size ii = 1; ii <= 3; ++ii ) {
473 if ( ! count_pair->count( jj, ii_id, weight, path_dist ) || weight != 1.0 ) {
585 utility_exit_with_message(
"ERROR: ignore_h_collisions_ must be set before the downstream restype is initialized" );