14 #ifndef INCLUDED_core_conformation_Residue_hh
15 #define INCLUDED_core_conformation_Residue_hh
45 #include <utility/pointer/access_ptr.hh>
46 #include <utility/pointer/owning_ptr.hh>
47 #include <utility/pointer/ReferenceCount.hh>
48 #include <numeric/xyzVector.hh>
49 #include <numeric/xyzMatrix.fwd.hh>
60 #include <utility/vector1.hh>
65 namespace conformation {
67 #ifdef USEBOOSTSERIALIZE
108 utility::pointer::ReferenceCount(),
rsd_type_(rsd_type_in) {}
115 bool preserve_c_beta =
false
467 return atoms_[ atm_index ];
482 return atoms_[ atm_index ];
528 xyz(
Size const atm_index )
const;
900 return icoor( atomno ).
build( *
this, conformation );
962 Vector orbital_vector(orb_icoor.build(stub1_xyz, stub2_xyz, stub3_xyz));
963 return orbital_vector;
976 orbitals_[ orbital_index ].xyz( xyz_in );
1008 return orbitals_[ orbital_index ].type();
1022 orbital_index = orbital_indices.begin(),
1023 orbital_index_end = orbital_indices.end();
1024 orbital_index != orbital_index_end; ++orbital_index
1197 Size const resconn_index,
1198 Size const otherres,
1199 Size const other_connid
1206 Size const resconn_index,
1261 std::map< Size, PseudoBondCollectionCOP >
const &
1430 return chi_[ chino ];
1744 set_d(
int const chino,
Real const setting );
1796 utility::vector1< std::pair< std::string, std::string > >
const & atom_pairs
1805 bool preserve_c_beta =
false
1826 #ifdef USEBOOSTSERIALIZE
1828 void serialized(
bool) {
1829 using namespace core::chemical;
1833 std::vector< ResidueType const * > serialized_restypes;
1835 while( current_res->serialized_ ) {
1838 if( current_res->base_restype_name() ==
"" )
1840 current_res = &(restype_set->name_map( current_res->base_restype_name()));
1937 #ifdef USEBOOSTSERIALIZE
1939 friend class boost::serialization::access;
1940 template<
class Archive>
1941 void serialize(Archive &ar,
const unsigned int file_version) {}
1942 template<
class Archive>
friend void save_construct_data( Archive & ar,
const Residue *
t,
const unsigned int file_version);
1943 template<
class Archive>
friend void load_construct_data( Archive & ar,
Residue *
t,
const unsigned int file_version);
1949 #ifdef USEBOOSTSERIALIZE
1950 template<
class Archive>
1951 inline void save_construct_data(
1952 Archive & ar,
const Residue *
t,
const unsigned int file_version
1954 using namespace core::chemical;
1969 std::vector< ResidueType const * > serialized_restypes;
1971 while( current_res->nondefault_ && !current_res->serialized_ ) {
1972 serialized_restypes.push_back( current_res );
1974 if( current_res->base_restype_name_ ==
"" )
1976 current_res = &(restype_set->name_map( current_res->base_restype_name_));
1980 int serialized_restypes_size = serialized_restypes.size();
1981 ar & serialized_restypes_size;
1986 for( std::vector< ResidueType const * >::reverse_iterator itr = serialized_restypes.rbegin(); itr < serialized_restypes.rend(); itr++ ) {
1987 ar & (**itr).
name();
1988 ar & (**itr).base_restype_name_;
1989 ar & (**itr).n_non_polymeric_residue_connections_;
1990 ar & (**itr).residue_connections_;
1991 ar & (**itr).atom_2_residue_connection_map_;
1992 ar & (**itr).variant_types_;
1993 ar & (**itr).icoor_;
1994 ar & (**itr).atom_base_;
1999 (**itr).serialized_ =
true;
2015 template<
class Archive>
2016 inline void load_construct_data(
2017 Archive & ar,
Residue * t,
const unsigned int file_version
2019 using namespace core::chemical;
2022 ar >> restypeset_name;
2026 ar & this_restype_name;
2028 int serialized_restypes_size;
2029 ar & serialized_restypes_size;
2031 for(
int i = 0 ; i < serialized_restypes_size; i++ ) {
2037 ar & base_restype_name;
2038 ResidueType const & base_res = restype_set->name_map( base_restype_name);
2040 new_restype = base_res.
clone();
2041 new_restype->name( restype_name );
2042 new_restype->nondefault_ =
true;
2043 new_restype->base_restype_name_ = base_restype_name;
2045 ar & new_restype->n_non_polymeric_residue_connections_;
2046 ar & new_restype->residue_connections_;
2047 ar & new_restype->atom_2_residue_connection_map_;
2048 ar & new_restype->variant_types_;
2049 ar & new_restype->icoor_;
2050 ar & new_restype->atom_base_;
2051 ar & new_restype->xyz_;
2052 if( !restype_set->has_name(restype_name) ) {
2053 new_restype->finalize();
2054 restype_set->add_residue_type( new_restype);
2056 if( new_restype->is_ligand() ) {
2057 core::conformation::add_cloned_ligand_rotamer_library( *new_restype, base_res );
2063 ::new(t) core::conformation::
Residue( restype_set->name_map(this_restype_name), true, true);