22 #include <basic/Tracer.hh>
31 #include <ObjexxFCL/string.functions.hh>
33 #include <utility/vector1.hh>
34 #include <numeric/xyz.functions.hh>
37 namespace ObjexxFCL { }
using namespace ObjexxFCL;
48 static basic::Tracer
tw(
"core.chemical.AtomICoor", basic::t_warning );
64 ICoorAtomID::ICoorAtomID(
69 if ( name.size() <= 4 ) {
72 }
else if ( name.substr(0,4) ==
"CONN" ) {
74 assert( is_int( name.substr(4) ) );
75 atomno_ = int_of( name.substr(4) );
77 }
else if ( name ==
"LOWER" ) {
78 type_ = POLYMER_LOWER; atomno_ = 0;
80 }
else if ( name ==
"UPPER" ) {
81 type_ = POLYMER_UPPER;
84 utility_exit_with_message(
"ICoorAtomID: unable to parse atom_name: "+name );
95 static Vector NullVector( 0, 0, 0 );
104 return rsd.
atom( atomno_ ).
xyz();
105 }
else if ( type_ == POLYMER_LOWER ) {
106 int const seqpos( rsd.
seqpos() - 1 );
111 }
else if ( type_ == POLYMER_UPPER ) {
112 int const seqpos( rsd.
seqpos() + 1 );
117 }
else if ( type_ == CONNECT ) {
119 Size const connid( atomno_ );
121 if ( partner_seqpos < 1 || partner_seqpos >
int( conformation.
size() ) ) {
122 tw <<
"ICoorAtomID xyz depends on invalid residue connection, returning BOGUS coords: this_rsd= " << rsd.
name() <<
123 ' ' << rsd.
seqpos() <<
" connid= " << connid <<
" partner_seqpos= " << partner_seqpos <<
'\n';
128 return conformation.
xyz(
id::AtomID( partner_atomno, partner_seqpos ) );
130 utility_exit_with_message(
"unrecognized stub atom id type!" );
146 }
else if ( type_ == POLYMER_LOWER ) {
148 }
else if ( type_ == POLYMER_UPPER ) {
150 }
else if ( type_ == CONNECT ) {
153 utility_exit_with_message(
"unrecognized stub atom id type!" );
157 static Vector NullVector( 0, 0, 0 );
169 runtime_assert( type_ ==
INTERNAL );
170 return rsd.
atom( atomno_ ).
xyz();
181 return AtomID( atomno_, seqpos );
203 stub_atom2_.xyz( rsd, conformation ),
204 stub_atom3_.xyz( rsd, conformation ) ).is_orthogonal( 0.001 ) );
207 stub_atom2_.xyz( rsd, conformation ),
208 stub_atom3_.xyz( rsd, conformation ) ).
spherical( phi_, theta_, d_ );
217 stub_atom2_.xyz( rsd_type ),
218 stub_atom3_.xyz( rsd_type ) ).is_orthogonal( 0.001 ) );
221 stub_atom2_.xyz( rsd_type ),
222 stub_atom3_.xyz( rsd_type ) ).
spherical( phi_, theta_, d_ );
234 stub_atom2_.xyz( rsd ),
235 stub_atom3_.xyz( rsd ) ).is_orthogonal( 0.001 ) );
238 stub_atom2_.xyz( rsd ),
239 stub_atom3_.xyz( rsd ) ).
spherical( phi_, theta_, d_ );