nAtoms = coords.GetNumber_of_points();
67 TRACEMSG(
"model has "<< nAtoms <<
" atomic coords");
69 boolhaveTemp = coords.IsSetTemperature_factors(),
70haveOccup = coords.IsSetOccupancies(),
71haveAlt = coords.IsSetAlternate_conf_ids();
74 if(coords.GetAtoms().GetMolecule_ids().size()!=nAtoms ||
75coords.GetAtoms().GetResidue_ids().size()!=nAtoms ||
76coords.GetAtoms().GetAtom_ids().size()!=nAtoms ||
77coords.GetSites().GetX().size()!=nAtoms ||
78coords.GetSites().GetY().size()!=nAtoms ||
79coords.GetSites().GetZ().size()!=nAtoms ||
81((coords.GetTemperature_factors().IsIsotropic() &&
82coords.GetTemperature_factors().GetIsotropic().GetB().size()!=nAtoms) ||
83(coords.GetTemperature_factors().IsAnisotropic() &&
84(coords.GetTemperature_factors().GetAnisotropic().GetB_11().size()!=nAtoms ||
85coords.GetTemperature_factors().GetAnisotropic().GetB_12().size()!=nAtoms ||
86coords.GetTemperature_factors().GetAnisotropic().GetB_13().size()!=nAtoms ||
87coords.GetTemperature_factors().GetAnisotropic().GetB_22().size()!=nAtoms ||
88coords.GetTemperature_factors().GetAnisotropic().GetB_23().size()!=nAtoms ||
89coords.GetTemperature_factors().GetAnisotropic().GetB_33().size()!=nAtoms)))) ||
90(haveOccup && coords.GetOccupancies().GetO().size()!=nAtoms) ||
91(haveAlt && coords.GetAlternate_conf_ids().Get().size()!=nAtoms))
92 ERRORMSG(
"AtomSet: confused by list length mismatch");
95CAtom_pntrs::TMolecule_ids::const_iterator
96i_mID = coords.GetAtoms().GetMolecule_ids().begin();
97CAtom_pntrs::TResidue_ids::const_iterator
98i_rID = coords.GetAtoms().GetResidue_ids().begin();
99CAtom_pntrs::TAtom_ids::const_iterator
100i_aID = coords.GetAtoms().GetAtom_ids().begin();
103 doublesiteScale =
static_cast<double>(coords.GetSites().GetScale_factor());
104CModel_space_points::TX::const_iterator i_X = coords.GetSites().GetX().begin();
105CModel_space_points::TY::const_iterator i_Y = coords.GetSites().GetY().begin();
106CModel_space_points::TZ::const_iterator i_Z = coords.GetSites().GetZ().begin();
109CAtomic_occupancies::TO::const_iterator i_occup;
110 doubleoccupScale = 0.0;
112occupScale =
static_cast<double>(coords.GetOccupancies().GetScale_factor());
113i_occup = coords.GetOccupancies().GetO().begin();
117CAlternate_conformation_ids::Tdata::const_iterator i_alt;
118 if(haveAlt) i_alt = coords.GetAlternate_conf_ids().Get().begin();
121 doubletempScale = 0.0;
122CIsotropic_temperature_factors::TB::const_iterator i_tempI;
123CAnisotropic_temperature_factors::TB_11::const_iterator i_tempA11;
124CAnisotropic_temperature_factors::TB_12::const_iterator i_tempA12;
125CAnisotropic_temperature_factors::TB_13::const_iterator i_tempA13;
126CAnisotropic_temperature_factors::TB_22::const_iterator i_tempA22;
127CAnisotropic_temperature_factors::TB_23::const_iterator i_tempA23;
128CAnisotropic_temperature_factors::TB_33::const_iterator i_tempA33;
130 if(coords.GetTemperature_factors().IsIsotropic()) {
131tempScale =
static_cast<double> 132(coords.GetTemperature_factors().GetIsotropic().GetScale_factor());
133i_tempI = coords.GetTemperature_factors().GetIsotropic().GetB().begin();
135tempScale =
static_cast<double> 136(coords.GetTemperature_factors().GetAnisotropic().GetScale_factor());
137i_tempA11 = coords.GetTemperature_factors().GetAnisotropic().GetB_11().begin();
138i_tempA12 = coords.GetTemperature_factors().GetAnisotropic().GetB_12().begin();
139i_tempA13 = coords.GetTemperature_factors().GetAnisotropic().GetB_13().begin();
140i_tempA22 = coords.GetTemperature_factors().GetAnisotropic().GetB_22().begin();
141i_tempA23 = coords.GetTemperature_factors().GetAnisotropic().GetB_23().begin();
142i_tempA33 = coords.GetTemperature_factors().GetAnisotropic().GetB_33().begin();
147 if(!GetParentOfType(&constObject))
return;
151 for(
unsigned int i=0;
i<nAtoms; ++
i) {
154atom->
site.
x= (
static_cast<double>(*(i_X++)))/siteScale;
155atom->
site.
y= (
static_cast<double>(*(i_Y++)))/siteScale;
156atom->
site.
z= (
static_cast<double>(*(i_Z++)))/siteScale;
158atom->
occupancy= (
static_cast<double>(*(i_occup++)))/occupScale;
162 if(coords.GetTemperature_factors().IsIsotropic()) {
164(
static_cast<double>(*(i_tempI++)))/tempScale;
167(
static_cast<double>(*(i_tempA11++))) +
168(
static_cast<double>(*(i_tempA12++))) +
169(
static_cast<double>(*(i_tempA13++))) +
170(
static_cast<double>(*(i_tempA22++))) +
171(
static_cast<double>(*(i_tempA23++))) +
172(
static_cast<double>(*(i_tempA33++)))) / (tempScale * 6.0);
188 if(atomMap.find(
key) != atomMap.end()) {
189AtomAltList::const_iterator i_atom, e=atomMap[
key].end();
190 for(i_atom=atomMap[
key].begin(); i_atom!=e; ++i_atom) {
191 if((*i_atom)->altConfID == atom->
altConfID)
192 ERRORMSG(
"confused by multiple atoms of same pntr+altConfID");
195atomMap[
key].push_back(atom);
198 ", y "<< atom->
site.
y<<
199 ", z "<< atom->
site.
z<<
201 ", altConfId '"<< atom->
altConfID<<
"'"<<
206 if(haveAlt && coords.IsSetConf_ensembles()) {
207CAtomic_coordinates::TConf_ensembles::const_iterator i_ensemble,
208e_ensemble = coords.GetConf_ensembles().end();
209 for(i_ensemble=coords.GetConf_ensembles().begin(); i_ensemble!=e_ensemble; ++i_ensemble) {
211 string*ensembleStr =
new string();
212CConformation_ensemble::TAlt_conf_ids::const_iterator i_altIDs,
215i_altIDs!=e_altIDs; ++i_altIDs) {
216(*ensembleStr) += i_altIDs->Get()[0];
218ensembles.push_back(ensembleStr);
219 TRACEMSG(
"alt conf ensemble '"<< (*ensembleStr) <<
"'");
226EnsembleList::iterator
i, e=
ensembles.end();
228 delete const_cast<string*
>(*i);
239EnsembleList::const_iterator e, ee=
ensembles.end();
240 for(e=
ensembles.begin(); e!=ee; ++e) {
241 if(*e == ensemble)
break;
244 ERRORMSG(
"AtomSet::SetActiveEnsemble received invalid ensemble");
253 boolgetAny,
boolsuppressWarning)
const 256 if(atomConfs ==
atomMap.end()) {
257 if(!suppressWarning)
258 WARNINGMSG(
"can't find atom(s) from pointer ("<< ap.
mID<<
',' 259<< ap.
rID<<
','<< ap.
aID<<
')');
262AtomAltList::const_iterator atom = atomConfs->second.begin();
268AtomAltList::const_iterator e = atomConfs->second.end();
269 for(; atom!=e; ++atom) {
275 if(getAny)
returnatomConfs->second.front();
282averageTemperature(NO_TEMPERATURE),
283occupancy(NO_OCCUPANCY),
284altConfID(NO_ALTCONFID)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
double averageTemperature
static const double NO_TEMPERATURE
static const double NO_OCCUPANCY
static const char NO_ALTCONFID
AtomCoord(StructureBase *parent)
const AtomCoord * GetAtom(const AtomPntr &atom, bool getAny=false, bool suppressWarning=false) const
const std::string * activeEnsemble
AtomPntrKey MakeKey(const AtomPntr &ap) const
std::pair< int, std::pair< int, int > > AtomPntrKey
bool SetActiveEnsemble(const std::string *ensemble)
CConformation_ensemble â.
static const double NO_TEMPERATURE
static string MakeKey(CScoreValue const &)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
const TAlt_conf_ids & GetAlt_conf_ids(void) const
Get the Alt_conf_ids member data.
const TYPE & Get(const CNamedParameterList *param)
const struct ncbi::grid::netcache::search::fields::KEY key
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4