123 Load(structureLimit);
130 Load(structureLimit);
138 ERRORMSG(
"LoadSequencesForSingleStructure() called, but there is > 1 structure");
139 if (
objects.size() != 1)
return;
142 ChemicalGraph::MoleculeMap::const_iterator m, me =
objects.front()->graph->molecules.end();
144 for (m=
objects.front()->graph->molecules.begin(); m!=me; ++m) {
145 if (!m->second->IsProtein() && !m->second->IsNucleotide())
continue;
149 if ((*s)->molecule !=
NULL)
continue;
151 if (m->second->identifier == (*s)->identifier) {
154 if (m->second->residues.size() != (*s)->Length()) {
156 "LoadSequencesForSingleStructure() - length mismatch between sequence gi "
157 <<
"and matching molecule " << m->second->identifier->ToString());
160 TRACEMSG(
"matched sequence " <<
" gi " << (*s)->identifier->gi <<
" with object "
161 <<
objects.front()->GetPDBID() <<
" moleculeID " << m->second->id);
163 (
const_cast<Molecule*
>(m->second))->sequence = *s;
164 (
const_cast<Sequence*
>(*s))->molecule = m->second;
169 ERRORMSG(
"LoadSequencesForSingleStructure() - can't find sequence for molecule "
170 << m->second->identifier->ToString());
176 if (
objects.size() > 0)
return false;
177 TRACEMSG(
"loading master " << masterMMDBID);
182 ERRORMSG(
"StructureSet::LoadMaster() - mismatched master MMDB ID");
186 if ((*b)->GetId().front()->IsMmdb_id() &&
187 (*b)->GetId().front()->GetMmdb_id().Get() == masterMMDBID) {
205 ChemicalGraph::MoleculeMap::const_iterator m, me = obj->
graph->
molecules.end();
207 if (!(m->second->IsProtein() || m->second->IsNucleotide()))
continue;
209 if (m->second->identifier == seq->
identifier) {
212 if (m->second->residues.size() != seq->
Length()) {
214 "MatchSequenceToMoleculeInObject() - length mismatch between sequence gi "
215 <<
"and matching molecule " << m->second->identifier->ToString());
219 << obj->
GetPDBID() <<
" moleculeID " << m->second->id);
222 if (m->second->sequence) {
223 ERRORMSG(
"Molecule " << m->second->identifier->ToString()
224 <<
" already has an associated sequence");
233 seq =
new Sequence(seqSetMod, bioseqMod);
237 if (seqHandle) *seqHandle = seq;
241 (
const_cast<Molecule*
>(m->second))->sequence = seq;
250 vector < bool > *dontLoadRowStructure)
252 vector < string > titles;
253 vector < unsigned int > rows;
256 AlignmentSet::AlignmentList::const_iterator
l,
le = alignmentSet->
alignments.end();
260 titles.push_back((*l)->dependent->identifier->ToString());
265 if (*structureLimit - 1 >= titles.size())
return;
268 wxString *items =
new wxString[titles.size()];
269 vector < bool > itemsOn(titles.size(),
false);
271 items[
row] = titles[
row].c_str();
272 if (
row < *structureLimit - 1)
277 if (dialog.ShowModal() == wxOK) {
284 (*dontLoadRowStructure)[rows[
row]] =
true;
314 const SeqAlignList& seqAligns = alignments->front()->GetData().GetAlign();
319 bool seq1PresentInAll =
true, seq2PresentInAll =
true;
322 const CSeq_id& frontSid = seqAligns.front()->GetSegs().IsDendiag() ?
323 seqAligns.front()->GetSegs().GetDendiag().front()->GetIds().front().GetObject() :
324 seqAligns.front()->GetSegs().GetDenseg().GetIds().front().GetObject();
325 const CSeq_id& backSid = seqAligns.front()->GetSegs().IsDendiag() ?
326 seqAligns.front()->GetSegs().GetDendiag().front()->GetIds().back().GetObject() :
327 seqAligns.front()->GetSegs().GetDenseg().GetIds().back().GetObject();
330 if ((*s)->identifier->MatchesSeqId(frontSid)) seq1 = *s;
331 if ((*s)->identifier->MatchesSeqId(backSid)) seq2 = *s;
332 if (seq1 && seq2)
break;
334 if (!(seq1 && seq2)) {
335 ERRORMSG(
"Can't match first pair of Seq-ids to Sequences");
340 SeqAlignList::const_iterator
a = seqAligns.begin(), ae = seqAligns.end();
341 for (++
a;
a!=ae; ++
a) {
342 const CSeq_id& frontSid2 = (*a)->GetSegs().IsDendiag() ?
343 (*a)->GetSegs().GetDendiag().front()->GetIds().front().GetObject() :
344 (*a)->GetSegs().GetDenseg().GetIds().front().GetObject();
345 const CSeq_id& backSid2 = (*a)->GetSegs().IsDendiag() ?
346 (*a)->GetSegs().GetDendiag().front()->GetIds().back().GetObject() :
347 (*a)->GetSegs().GetDenseg().GetIds().back().GetObject();
349 seq1PresentInAll =
false;
350 if (!seq2->identifier->MatchesSeqId(frontSid2) && !seq2->identifier->MatchesSeqId(backSid2))
351 seq2PresentInAll =
false;
353 if (!seq1PresentInAll && !seq2PresentInAll) {
354 ERRORMSG(
"All pairwise sequence alignments must have a common master sequence");
356 }
else if (seq1PresentInAll && !seq2PresentInAll)
358 else if (seq2PresentInAll && !seq1PresentInAll)
360 else if (seq1PresentInAll && seq2PresentInAll && seq1 == seq2)
370 ERRORMSG(
"Unable to match CDD's master3d with either sequence in first pairwise alignment");
376 if (structureLimit > 0)
384 else if (masterMMDBID == seq2->identifier->mmdbID)
387 ERRORMSG(
"Structure master does not contain either sequence in first pairwise alignment");
399 TRACEMSG(
"determined that master sequence is " << master->identifier->ToString());
406 masterMMDBID = master->identifier->mmdbID;
408 master->identifier->mmdbID != masterMMDBID) {
409 ERRORMSG(
"master structure (" << masterMMDBID <<
410 ") disagrees with master sequence (apparently from " << master->identifier->mmdbID <<
')');
414 master->identifier->GetLabel() !=
"consensus")
419 ERRORMSG(
"MatchSequenceToMoleculeInObject() - can't find molecule in object, sequence identifers don't match."
420 <<
objects.front()->GetPDBID() <<
" to match master sequence "
421 << master->identifier->ToString());
426 if (
objects.size() == 1 && structureLimit > 1) {
427 ASNDataManager::BiostrucList::const_iterator
b, be;
443 object->SetTransformToMaster(
449 if (loadedStructureForDependentRow[
row])
continue;
452 loadedStructureForDependentRow[
row] =
true;
458 <<
" doesn't have a matching dependent sequence in the multiple alignment");
473 !loadedStructureForDependentRow[
row]) {
479 if ((*b)->GetId().front()->IsMmdb_id() &&
480 (*b)->GetId().front()->GetMmdb_id().Get() == (*l)->dependent->identifier->mmdbID) {
488 if (biostruc.
Empty()) {
491 ERRORMSG(
"Failed to load MMDB #" << (*l)->dependent->identifier->mmdbID);
500 object->SetTransformToMaster(
505 <<
" with sequence " << (*l)->dependent->identifier->ToString());
506 loadedStructureForDependentRow[
row] =
true;
543 ERRORMSG(
"Data interpreted as multiple alignment, "
544 "but missing sequences and/or sequence alignments");
570 ERRORMSG(
"Error loading style dictionary");
579 ERRORMSG(
"Error loading user annotations or camera settings");
607 if (added &&
objects.size() == 1)
619 if (structureAlignments) {
620 structureAlignments->
SetId().clear();
621 structureAlignments->
SetDescr().clear();
630 structureAlignments->
SetId().resize(1);
633 structureAlignments->
SetId().front().GetObject().SetMmdb_id(*mid);
637 featSet->SetFeatures();
638 structureAlignments->
SetFeatures().resize(1, featSet);
645 int masterDomainID,
int dependentDomainID)
648 if (!structureAlignments) {
649 WARNINGMSG(
"StructureSet::AddStructureAlignment() - creating new structure alignment list");
655 int *currentMasterDomainID = &(structureAlignments->
SetFeatures().front().GetObject().SetId().Set());
657 *currentMasterDomainID = masterDomainID;
658 else if ((*currentMasterDomainID % 100) != (masterDomainID % 100))
659 *currentMasterDomainID = (*currentMasterDomainID / 100) * 100;
662 CBiostruc_feature_set::TFeatures::const_iterator
663 f, fe = structureAlignments->
GetFeatures().front().GetObject().GetFeatures().end();
664 for (
f=structureAlignments->
GetFeatures().front().GetObject().GetFeatures().begin();
f!=fe; ++
f) {
665 if ((
f->GetObject().GetId().Get() / 10) == (dependentDomainID / 10))
672 structureAlignments->
SetFeatures().front().GetObject().SetFeatures().resize(
673 structureAlignments->
GetFeatures().front().GetObject().GetFeatures().size() + 1, featureRef);
690 ERRORMSG(
"StructureSet::ReplaceAlignmentSet() - "
691 <<
"can't figure out where in the asn the alignments are to go");
702 ASNDataManager::SeqAnnotList::iterator o = seqAnnots->begin();
705 o->Reset(
n->GetPointer());
741 ERRORMSG(
"StructureSet::SaveASNData() - error creating user annotations blob");
750 err =
"MonitorAlignments() returned error, no file written";
776 DisplayLists::const_iterator d, de=
frameMap[
f].end();
777 for (d=
frameMap[
f].begin(); d!=de; ++d) {
782 ERRORMSG(
"frameMap: repeated display list " <<
l);
787 ERRORMSG(
"display list " <<
l <<
" not in frameMap");
790 unsigned int nLists = 0;
792 DisplayLists::const_iterator d, de=
frameMap[
f].end();
793 for (d=
frameMap[
f].begin(); d!=de; ++d) ++nLists;
796 ERRORMSG(
"frameMap has too many display lists");
807 if (given)
center = *given;
811 for (
int i=0;
i<2; ++
i) {
812 if (given &&
i==0)
continue;
813 ObjectList::const_iterator o, oe=
objects.end();
814 for (o=
objects.begin(); o!=oe; ++o) {
815 StructureObject::CoordSetList::const_iterator c, ce=(*o)->coordSets.end();
816 for (c=(*o)->coordSets.begin(); c!=ce; ++c) {
817 AtomSet::AtomMap::const_iterator
a, ae=(*c)->atomSet->atomMap.end();
818 for (
a=(*c)->atomSet->atomMap.begin();
a!=ae; ++
a) {
820 if ((*o)->IsDependent() && (*o)->transformToMaster)
838 center = siteSum / nAtoms;
850 TRACEMSG(
"Computing structure view...");
852 double alphaRadius = 0.0;
857 for (
int i=0;
i<2; ++
i) {
860 ChemicalGraph::MoleculeMap::const_iterator m, me =
objects.front()->graph->molecules.end();
861 for (m=
objects.front()->graph->molecules.begin(); m!=me; ++m) {
862 if (!m->second->IsBiopolymer())
864 Molecule::ResidueMap::const_iterator
r, re = m->second->residues.end();
865 for (
r=m->second->residues.begin();
r!=re; ++
r) {
867 AtomPntr ap(m->second->id,
r->first,
r->second->alphaID);
868 const AtomCoord* atom =
objects.front()->coordSets.front()->atomSet->GetAtom(ap,
true,
true);
871 alphaCenter += atom->
site;
874 double dist = (atom->
site - alphaCenter).length();
875 if (dist > alphaRadius)
885 alphaCenter /= nAlphas;
890 TRACEMSG(
"Centered view at " << alphaCenter <<
" radius " << alphaRadius);
899 if (!masterMolecule)
return false;
904 deque < Vector > coords;
905 Molecule::ResidueMap::const_iterator
r, re = masterMolecule->
residues.end();
906 for (
r=masterMolecule->
residues.begin();
r!=re; ++
r) {
907 if (!alignment->
IsAligned(0
U,
r->first - 1))
continue;
909 AtomPntr ap(masterMolecule->
id,
r->first,
r->second->alphaID);
910 const AtomCoord* atom = masterObject->
coordSets.front()->atomSet->GetAtom(ap,
true,
true);
911 if (atom) coords.push_back(atom->
site);
913 if (coords.size() == 0)
919 for (
i=0;
i<coords.size(); ++
i) alignedCenter += coords[
i];
920 alignedCenter /= coords.
size();
923 double radius = 0.0, d;
924 for (
i=0;
i<coords.size(); ++
i) {
925 d = (coords[
i] - alignedCenter).length();
926 if (d > radius) radius = d;
931 TRACEMSG(
"Centered view at " << alignedCenter <<
" radius " << radius);
951 NameMap::const_iterator
i =
nameMap.find(name);
952 if (
i ==
nameMap.end())
return false;
953 *residue =
i->second.first;
954 *atomID =
i->second.second;
978 molresid.Printf(
"%s heterogen/solvent molecule %i", object->
GetPDBID().c_str(), molecule->
id);
985 <<
") atom " << atomID <<
" (PDB: " << residue->
GetAtomInfo(atomID)->
name <<
')');
991 const AtomCoord *pickedAtom =
object->coordSets.front()->atomSet->
994 WARNINGMSG(
"Can't get coordinates for this atom (in the first coordinate set)");
1003 INFOMSG(
"distance to previously selected atom: " << setprecision(3) <<
1011 <<
" molecule " << molecule->
id <<
" residue " << residue->
id <<
", atom " << atomID);
1021 ObjectList::const_iterator o, oe =
objects.end();
1022 for (o=
objects.begin(); o!=oe; ++o)
1023 (*o)->SelectByDistance(cutoff, options, &residuesToHighlight);
1026 StructureObject::ResidueMap::const_iterator
r, re = residuesToHighlight.end();
1027 for (
r=residuesToHighlight.begin();
r!=re; ++
r)
1041 seq =
new Sequence(modifiableSet, bioseq);
1043 ERRORMSG(
"StructureSet::FindOrCreateSequence() - identifier conflict, no new sequence created");
1047 modifiableSet->
sequences.push_back(seq);
1055 ERRORMSG(
"StructureSet::FindOrCreateSequence() - no sequence list in asn data");
1066 rejectID->
SetIds() = reject->bioseqASN->GetId();
1087 INFOMSG(
"No rejects in this CD");
1092 RejectList::const_iterator
r, re = rejects->end();
1093 for (
r=rejects->begin();
r!=re; ++
r) {
1095 CReject_id::TIds::const_iterator
i, ie = (*r)->GetIds().end();
1096 for (
i=(*r)->GetIds().begin();
i!=ie; ++
i)
1097 idstr += (*i)->AsFastaString() +
", ";
1098 INFOMSG(idstr <<
"Reason: " <<
1099 (((*r)->IsSetDescription() && (*r)->GetDescription().front()->IsComment()) ?
1100 (*r)->GetDescription().front()->GetComment() :
string(
"none given")));
1112 if ((*s)->molecule) {
1114 ERRORMSG(
"sequence " << (*s)->identifier->ToString()
1115 <<
" has associated molecule but no MMDB id");
1118 (*s)->AddMMDBAnnotTag((*s)->identifier->mmdbID);
1149 StructureBase(parent), isMaster(master), mmdbID(NO_MMDB_ID), transformToMaster(
NULL),
1150 minTemperature(NO_TEMPERATURE), maxTemperature(NO_TEMPERATURE)
1156 CBiostruc::TId::const_iterator j, je=biostruc.
GetId().end();
1157 for (j=biostruc.
GetId().begin(); j!=je; ++j) {
1158 if (j->GetObject().IsMmdb_id()) {
1159 mmdbID = j->GetObject().GetMmdb_id().Get();
1167 CBiostruc::TDescr::const_iterator k, ke=biostruc.
GetDescr().end();
1168 for (k=biostruc.
GetDescr().begin(); k!=ke; ++k) {
1169 if (k->GetObject().IsName()) {
1170 pdbIDs.push_back(k->GetObject().GetName());
1179 CBiostruc::TModel::const_iterator
i, ie=biostruc.
GetModel().end();
1193 if (
i->GetObject().IsSetModel_coordinates()) {
1195 new CoordSet(
this,
i->GetObject().GetModel_coordinates());
1211 for (
unsigned int i=0;
i<
pdbIDs.size(); ++
i) {
1223 CBiostruc_annot_set::TFeatures::const_iterator f1, f1e=annot.
GetFeatures().end();
1224 for (f1=annot.
GetFeatures().begin(); f1!=f1e; ++f1) {
1225 CBiostruc_feature_set::TFeatures::const_iterator f2, f2e=f1->GetObject().GetFeatures().end();
1226 for (f2=f1->GetObject().GetFeatures().begin(); f2!=f2e; ++f2) {
1229 if (f2->GetObject().IsSetId() &&
1235 if (f2->GetObject().IsSetType() &&
1237 f2->GetObject().IsSetLocation() &&
1238 f2->GetObject().GetLocation().IsAlignment()) {
1248 graphAlign.
GetBiostruc_ids().front().GetObject().GetMmdb_id().Get() == masterMMDBID &&
1253 if (f2->GetObject().IsSetId())
1260 CTransform::TMoves::const_iterator
1261 m, me=graphAlign.
GetTransform().front().GetObject().GetMoves().end();
1262 for (m=graphAlign.
GetTransform().front().GetObject().GetMoves().begin(); m!=me; ++m) {
1265 if (m->GetObject().IsTranslate()) {
1273 const CRot_matrix& rot = m->GetObject().GetRotate();
1278 xmat.
m[12]=0; xmat.
m[13]=0; xmat.
m[14]=0; xmat.
m[15]=1;
1290 <<
" with master " << masterMMDBID <<
";\nwill likely require manual realignment");
1298 for (
int l=
range->from; l<=range->to; ++
l) {
1310 const Vector *
const *masterCoords,
const Vector *
const *dependentCoords,
1311 const double *weights,
int dependentRow)
1313 Vector masterCOM, dependentCOM;
1314 Matrix dependentRotation;
1318 RigidBodyFit(nCoords, masterCoords, dependentCoords, weights, masterCOM, dependentCOM, dependentRotation);
1329 INFOMSG(
"RMSD of alpha coordinates used to align master structure and " <<
GetPDBID() <<
": "
1338 location.GetObject().SetAlignment(*graphAlignment);
1349 dependentBID->SetMmdb_id(*dependentMID);
1367 graphAlignment->
SetAlignment().front().Reset(masterCGPs);
1368 graphAlignment->
SetAlignment().back().Reset(dependentCGPs);
1373 dependentCGPs->SetResidues(*dependentRPs);
1376 dependentRPs->SetInterval().resize(
blocks.size());
1377 BlockMultipleAlignment::UngappedAlignedBlockList::const_iterator
b, be =
blocks.end();
1378 CResidue_pntrs::TInterval::iterator
1380 si = dependentRPs->SetInterval().begin();
1385 mi->Reset(masterRIP);
1386 si->Reset(dependentRIP);
1389 dependentRIP->SetMolecule_id().Set(dependentMolecule->id);
1396 range = (*b)->GetRangeOfRow(dependentRow);
1397 dependentRIP->SetFrom().Set(
range->from + 1);
1398 dependentRIP->SetTo().Set(
range->to + 1);
1409 CTransform::TMoves::iterator m = xform->
SetMoves().begin();
1410 for (
int i=0;
i<3; ++
i, ++m) {
1413 static const int scaleFactor = 100000;
1418 trans->
SetTran_1((
int)(-(dependentCOM.
x * scaleFactor)));
1419 trans->
SetTran_2((
int)(-(dependentCOM.
y * scaleFactor)));
1420 trans->
SetTran_3((
int)(-(dependentCOM.
z * scaleFactor)));
1421 }
else if (
i == 1) {
1425 rot->
SetRot_11((
int)(dependentRotation[0] * scaleFactor));
1426 rot->
SetRot_12((
int)(dependentRotation[4] * scaleFactor));
1427 rot->
SetRot_13((
int)(dependentRotation[8] * scaleFactor));
1428 rot->
SetRot_21((
int)(dependentRotation[1] * scaleFactor));
1429 rot->
SetRot_22((
int)(dependentRotation[5] * scaleFactor));
1430 rot->
SetRot_23((
int)(dependentRotation[9] * scaleFactor));
1431 rot->
SetRot_31((
int)(dependentRotation[2] * scaleFactor));
1432 rot->
SetRot_32((
int)(dependentRotation[6] * scaleFactor));
1433 rot->
SetRot_33((
int)(dependentRotation[10] * scaleFactor));
1434 }
else if (
i == 2) {
1438 trans->
SetTran_1((
int)(masterCOM.
x * scaleFactor));
1439 trans->
SetTran_2((
int)(masterCOM.
y * scaleFactor));
1440 trans->
SetTran_3((
int)(masterCOM.
z * scaleFactor));
1446 if (masterDomain ==
NO_DOMAIN) masterDomain = 0;
1447 if (dependentDomain ==
NO_DOMAIN) dependentDomain = 0;
1451 masterDomainID = masterObject->
mmdbID*10000 + masterMolecule->
id*100 + masterDomain,
1452 dependentDomainID =
mmdbID*100000 + dependentMolecule->id*1000 + dependentDomain*10 + 1;
1458 << dependentMolecule->identifier->pdbID << dependentMolecule->identifier->pdbChain << dependentDomain <<
' '
1461 <<
", as computed by Cn3D";
1470 typedef vector < const AtomCoord * > CoordList;
1471 CoordList highlightedAtoms;
1473 MoleculeList moleculesWithHighlights;
1475 ChemicalGraph::MoleculeMap::const_iterator m, me =
graph->
molecules.end();
1477 Molecule::ResidueMap::const_iterator
r, re = m->second->residues.end();
1478 for (
r=m->second->residues.begin();
r!=re; ++
r) {
1482 Residue::AtomInfoMap::const_iterator
a, ae = atomInfos.end();
1483 for (
a=atomInfos.begin();
a!=ae; ++
a) {
1485 GetAtom(
AtomPntr(m->second->id,
r->second->id,
a->first),
true,
true);
1486 if (atomCoord) highlightedAtoms.push_back(atomCoord);
1488 moleculesWithHighlights[m->second] =
true;
1492 if (highlightedAtoms.size() == 0)
return;
1495 typedef vector < const Residue * > ResidueList;
1496 ResidueList unhighlightedResidues;
1499 Molecule::ResidueMap::const_iterator
r, re = m->second->residues.end();
1502 moleculesWithHighlights.find(m->second) != moleculesWithHighlights.end())
1505 for (
r=m->second->residues.begin();
r!=re; ++
r) {
1512 unhighlightedResidues.push_back(
r->second);
1515 if (unhighlightedResidues.size() == 0)
return;
1519 CoordList::const_iterator h, he = highlightedAtoms.end();
1520 ResidueList::const_iterator u, ue = unhighlightedResidues.end();
1521 for (u=unhighlightedResidues.begin(); u!=ue; ++u) {
1523 if (!(*u)->GetParentOfType(&molecule))
continue;
1526 Residue::AtomInfoMap::const_iterator
a, ae = atomInfos.end();
1527 for (
a=atomInfos.begin();
a!=ae; ++
a) {
1529 GetAtom(
AtomPntr(molecule->
id, (*u)->id,
a->first),
true,
true);
1530 if (!uAtomCoord)
continue;
1533 for (h=highlightedAtoms.begin(); h!=he; ++h) {
1534 if ((uAtomCoord->
site - (*h)->site).length() <= cutoff)
1543 (*selectedResidues)[*u] = molecule;
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.
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.
User-defined methods of the data storage class.
list< const CSeq_align * > SeqAlignList
bool HasDataChanged(void) const
bool GetCDDNotes(TextLines *lines) const
void SetUserAnnotations(ncbi::objects::CCn3d_user_annotations &annots)
bool SetCDDDescription(const std::string &descr)
const ncbi::objects::CBiostruc * GetMasterStructure(void) const
void ReplaceUpdates(UpdateAlignList &newUpdates)
void SetStyleDictionary(ncbi::objects::CCn3d_style_dictionary &styles)
void SetDataUnchanged(void) const
bool SetCDDNotes(const TextLines &lines)
const ncbi::objects::CCn3d_user_annotations * GetUserAnnotations(void) const
const UpdateAlignList * GetUpdates(void) const
unsigned int GetDataChanged(void) const
bool ConvertMimeDataToCDD(const std::string &cddName)
ncbi::objects::CAlign_annot_set * GetCDDAnnotSet(void)
std::list< const Sequence * > SequenceList
bool WriteDataToFile(const char *filename, bool isBinary, std::string *err, ncbi::EFixNonPrint fixNonPrint=ncbi::eFNP_Default) const
void SetStructureAlignments(ncbi::objects::CBiostruc_annot_set *structureAlignments)
ncbi::objects::EModel_type GetBiostrucModelType(void) const
bool AddBiostrucToASN(ncbi::objects::CBiostruc *biostruc)
SeqAnnotList * GetSequenceAlignments(void) const
bool IsSingleStructure(void) const
const ncbi::objects::CSeq_id * GetCDDMaster3d(void) const
const ncbi::objects::CCn3d_style_dictionary * GetStyleDictionary(void) const
void RemoveUserAnnotations(void)
bool IsCDDInMime(void) const
bool SetCDDName(const std::string &name)
void SetDataChanged(unsigned int what) const
const std::string & GetCDDName(void) const
const std::string & GetCDDDescription(void) const
void AddReject(ncbi::objects::CReject_id *reject)
ncbi::objects::CBiostruc_annot_set * GetStructureAlignments(void) const
const BiostrucList * GetStructureList(void) const
void RemoveStyleDictionary(void)
bool MonitorAlignments(void) const
ncbi::objects::CCdd_descr_set * GetCDDDescrSet(void)
const StructureSet::RejectList * GetRejects(void) const
std::list< ncbi::CRef< ncbi::objects::CSeq_annot > > SeqAnnotList
SeqEntryList * GetSequences(void) const
bool IsGeneralMime(void) const
void RemoveUnusedSequences(const AlignmentSet *alignmentSet, const SequenceList &updateSequences)
SeqAnnotList * GetOrCreateSequenceAlignments(void)
void PurgeSequence(const MoleculeIdentifier *identifier)
void GetUpdateSequences(std::list< const Sequence * > *updateSequences) const
const BlockMultipleAlignment * GetCurrentMultipleAlignment(void) const
SeqAnnotList * newAsnAlignmentData
std::vector< const UngappedAlignedBlock * > UngappedAlignedBlockList
const Sequence * GetSequenceOfRow(unsigned int row) const
void GetUngappedAlignedBlocks(UngappedAlignedBlockList *blocks) const
bool IsAligned(unsigned int row, unsigned int seqIndex) const
CCn3d_style_dictionary –.
CCn3d_user_annotations –.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
CResidue_interval_pntr –.
void SequenceWindowsSave(bool prompt)
bool RemoveAllHighlights(bool postRedraws)
void ToggleHighlight(const Molecule *molecule, int residueID, bool scrollViewersTo=false)
bool MatchesSeqId(const ncbi::objects::CSeq_id &sid) const
static void ClearIdentifiers(void)
static const int VALUE_NOT_SET
bool HasStructure(void) const
std::string ToString(void) const
std::vector< int > residueDomains
static const int NO_DOMAIN_SET
bool IsHeterogen(void) const
const MoleculeIdentifier * identifier
bool IsSolvent(void) const
void CenterView(const Vector &viewCenter, double radius)
bool LoadFromASNViewSettings(const ncbi::objects::CCn3d_user_annotations &annotations)
static const unsigned int NO_NAME
bool SaveToASNViewSettings(ncbi::objects::CCn3d_user_annotations *annotations)
static const unsigned int FIRST_LIST
static const unsigned int NO_LIST
const AtomInfo * GetAtomInfo(int aID) const
static const int NO_ALPHA_ID
std::map< int, const AtomInfo * > AtomInfoMap
const Sequence * FindMatchingSequence(const ncbi::objects::CBioseq::TId &ids) const
const Molecule * molecule
const MoleculeIdentifier * identifier
unsigned int Length(void) const
CConstRef< objects::CBioseq > bioseqASN
void ConstructShowHideArray(const StructureSet *structureSet)
void ShowAlignedOrAnnotatedDomains(const StructureSet *set)
bool GetParentOfType(const T **ptr, bool warnIfNotFound=true) const
bool SetTransformToMaster(const ncbi::objects::CBiostruc_annot_set &annot, int masterMMDBID)
void RealignStructure(int nCoords, const Vector *const *masterCoords, const Vector *const *dependentCoords, const double *weights, int dependentRow)
void SelectByDistance(double cutoff, unsigned int options, ResidueMap *selectedResidues) const
StructureObject(StructureBase *parent, const ncbi::objects::CBiostruc &biostruc, bool isMaster)
static const double NO_TEMPERATURE
std::vector< std::string > pdbIDs
Matrix * transformToMaster
std::string GetPDBID(char separator='_') const
const ChemicalGraph * graph
DomainIDMap domainID2MMDB
std::map< const Residue *, const Molecule * > ResidueMap
bool IsDependent(void) const
static const int NO_MMDB_ID
bool IsCDDInMime(void) const
bool AddBiostrucToASN(ncbi::objects::CBiostruc *biostruc)
const AlignmentSet * alignmentSet
static const unsigned int eRowOrderData
std::vector< std::string > TextLines
const RejectList * GetRejects(void) const
void ShowRejects(void) const
std::map< const ncbi::objects::CBiostruc *, bool > usedStructures
bool Draw(const AtomSet *atomSet) const
void SetCenter(const Vector *setTo=NULL)
static const unsigned int eUserAnnotationData
void SelectByDistance(double cutoff, unsigned int options) const
void InitStructureAlignments(int masterMMDBID)
unsigned int lastDisplayList
const Sequence * FindOrCreateSequence(ncbi::objects::CBioseq &bioseq)
static const unsigned int eAnyAlignmentData
unsigned int lastAtomName
ncbi::objects::CCdd_descr_set * GetCDDDescrSet(void)
const SequenceSet * sequenceSet
bool SetCDDDescription(const std::string &descr)
static const unsigned int eSelectProtein
void RemoveUnusedSequences(void)
static const unsigned int eSequenceData
bool havePrevPickedAtomCoord
void ReplaceAlignmentSet(AlignmentSet *newAlignmentSet)
void LoadAlignmentsAndStructures(unsigned int structureLimit)
static const unsigned int eSelectNucleotide
void CenterViewOnStructure(void)
bool MatchSequenceToMoleculeInObject(const Sequence *seq, const StructureObject *obj, const Sequence **seqHandle=NULL)
static const unsigned int eSelectHeterogen
static const unsigned int eCDDData
bool IsMultiStructure(void) const
bool SaveASNData(const char *filename, bool doBinary, unsigned int *changeFlags)
bool LoadMaster(int masterMMDBID)
bool CenterViewOnAlignedResidues(void)
std::map< int, bool > usedFeatures
bool SetCDDName(const std::string &name)
void SelectedAtom(unsigned int name, bool setCenter)
void AddStructureAlignment(ncbi::objects::CBiostruc_feature *feature, int masterDomainID, int dependentDomainID)
bool SetCDDNotes(const TextLines &lines)
bool MonitorAlignments(void) const
void RemoveStructureAlignments(void)
Vector prevPickedAtomCoord
AlignmentManager * alignmentManager
void LoadSequencesForSingleStructure(void)
unsigned int CreateName(const Residue *residue, int atomID)
ShowHideManager * showHideManager
bool ConvertMimeDataToCDD(const std::string &cddName)
static const unsigned int eOtherData
bool HasStructuredMaster(void) const
static const unsigned int eUpdateData
static const unsigned int eStructureAlignmentData
void ReplaceUpdates(ncbi::objects::CCdd::TPending &newUpdates)
static const unsigned int eStyleData
void VerifyFrameMap(void) const
const std::string & GetCDDName(void) const
OpenGLRenderer * renderer
void RejectAndPurgeSequence(const Sequence *reject, std::string reason, bool purge)
void SetDataChanged(unsigned int what) const
bool HasDataChanged(void) const
static const unsigned int eSelectSolvent
StructureSet(ncbi::objects::CNcbi_mime_asn1 *mime, unsigned int structureLimit, OpenGLRenderer *r)
void Load(unsigned int structureLimit)
StyleManager * styleManager
ASNDataManager * dataManager
static const unsigned int eSelectOtherMoleculesOnly
ncbi::objects::CAlign_annot_set * GetCDDAnnotSet(void)
const std::string & GetCDDDescription(void) const
bool GetAtomFromName(unsigned int name, const Residue **residue, int *atomID) const
static const unsigned int ePSSMData
std::list< ncbi::CRef< ncbi::objects::CReject_id > > RejectList
bool GetCDDNotes(TextLines *lines) const
bool LoadFromASNStyleDictionary(const ncbi::objects::CCn3d_style_dictionary &styleDictionary)
ncbi::objects::CCn3d_style_dictionary * CreateASNStyleDictionary(void) const
bool SaveToASNUserAnnotations(ncbi::objects::CCn3d_user_annotations *annotations) const
bool LoadFromASNUserAnnotations(const ncbi::objects::CCn3d_user_annotations &annotations)
bool CheckGlobalStyleSettings(void)
virtual size_t size() const
void Set(double xs, double ys, double zs)
CNcbi_mime_asn1 * LoadStructureViaCache(const std::string &uid, ncbi::objects::EModel_type modelType, int assemblyId)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char si[8][64]
static const char location[]
@ eFNP_Replace
replace with '#' silently
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
TObjectType & GetObject(void) const
Get object.
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
void SetScale_factor(TScale_factor value)
Assign a value to Scale_factor data member.
TBiostruc_ids & SetBiostruc_ids(void)
Assign a value to Biostruc_ids data member.
TAlignment & SetAlignment(void)
Assign a value to Alignment data member.
TRot_23 GetRot_23(void) const
Get the Rot_23 member data.
void SetName(const TName &value)
Assign a value to Name data member.
TInterval & SetInterval(void)
Select the variant.
void SetRot_33(TRot_33 value)
Assign a value to Rot_33 data member.
void SetMolecule_id(const TMolecule_id &value)
Assign a value to Molecule_id data member.
void SetRot_32(TRot_32 value)
Assign a value to Rot_32 data member.
void SetTo(const TTo &value)
Assign a value to To data member.
TRot_22 GetRot_22(void) const
Get the Rot_22 member data.
TTransform & SetTransform(void)
Assign a value to Transform data member.
bool IsSetTransform(void) const
Check if a value has been assigned to Transform data member.
TDimension GetDimension(void) const
Get the Dimension member data.
void SetRot_22(TRot_22 value)
Assign a value to Rot_22 data member.
void SetId(const TId &value)
Assign a value to Id data member.
TTran_1 GetTran_1(void) const
Get the Tran_1 member data.
void SetScale_factor(TScale_factor value)
Assign a value to Scale_factor data member.
TRot_32 GetRot_32(void) const
Get the Rot_32 member data.
TRot_21 GetRot_21(void) const
Get the Rot_21 member data.
const TTransform & GetTransform(void) const
Get the Transform member data.
TRot_13 GetRot_13(void) const
Get the Rot_13 member data.
TTran_2 GetTran_2(void) const
Get the Tran_2 member data.
void SetRot_11(TRot_11 value)
Assign a value to Rot_11 data member.
TScale_factor GetScale_factor(void) const
Get the Scale_factor member data.
void SetTran_2(TTran_2 value)
Assign a value to Tran_2 data member.
void SetRot_21(TRot_21 value)
Assign a value to Rot_21 data member.
TTran_3 GetTran_3(void) const
Get the Tran_3 member data.
void SetId(TId value)
Assign a value to Id data member.
void SetRot_13(TRot_13 value)
Assign a value to Rot_13 data member.
void SetDimension(TDimension value)
Assign a value to Dimension data member.
void SetRot_23(TRot_23 value)
Assign a value to Rot_23 data member.
TRot_12 GetRot_12(void) const
Get the Rot_12 member data.
TMoves & SetMoves(void)
Assign a value to Moves data member.
void SetTran_1(TTran_1 value)
Assign a value to Tran_1 data member.
void SetType(TType value)
Assign a value to Type data member.
const TBiostruc_ids & GetBiostruc_ids(void) const
Get the Biostruc_ids member data.
TScale_factor GetScale_factor(void) const
Get the Scale_factor member data.
void SetTran_3(TTran_3 value)
Assign a value to Tran_3 data member.
TResidues & SetResidues(void)
Select the variant.
TRot_11 GetRot_11(void) const
Get the Rot_11 member data.
void SetRot_31(TRot_31 value)
Assign a value to Rot_31 data member.
void SetFrom(const TFrom &value)
Assign a value to From data member.
TRot_33 GetRot_33(void) const
Get the Rot_33 member data.
TRotate & SetRotate(void)
Select the variant.
TTranslate & SetTranslate(void)
Select the variant.
const TAlignment & GetAlignment(void) const
Get the Alignment member data.
TRot_31 GetRot_31(void) const
Get the Rot_31 member data.
void SetRot_12(TRot_12 value)
Assign a value to Rot_12 data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
@ eType_alignment
VAST reserved.
@ eModel_type_ncbi_backbone
@ eModel_type_ncbi_vector
const TFeatures & GetFeatures(void) const
Get the Features member data.
TDescr & SetDescr(void)
Assign a value to Descr data member.
TId & SetId(void)
Assign a value to Id data member.
TFeatures & SetFeatures(void)
Assign a value to Features data member.
const TFeatures & GetFeatures(void) const
Get the Features member data.
TMmdb_id & SetMmdb_id(void)
Select the variant.
const TId & GetId(void) const
Get the Id member data.
const TModel & GetModel(void) const
Get the Model member data.
const TChemical_graph & GetChemical_graph(void) const
Get the Chemical_graph member data.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
bool IsSetModel(void) const
Check if a value has been assigned to Model data member.
TComment & SetComment(void)
Select the variant.
TIds & SetIds(void)
Assign a value to Ids data member.
TDescription & SetDescription(void)
Assign a value to Description data member.
bool IsSetView(void) const
Check if a value has been assigned to View data member.
bool IsSetAnnotations(void) const
Check if a value has been assigned to Annotations data member.
TSeq & SetSeq(void)
Select the variant.
Messenger * GlobalMessenger(void)
range(_Ty, _Ty) -> range< _Ty >
The NCBI C++/STL use hints.
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
bool le(T x_, T y_, T round_)
bool ne(T x_, T y_, T round_)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
double f(double x_, const double &y_)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
static DP_BlockInfo * blocks
static const int MULTI_DOMAIN
static void AddDomain(int *domain, const Molecule *molecule, const Block::Range *range)
static void SetStructureRowFlags(const AlignmentSet *alignmentSet, unsigned int *structureLimit, vector< bool > *dontLoadRowStructure)
static const int NO_DOMAIN
double ComputeRMSD(int nCoords, const Vector *const *masterCoords, const Vector *const *dependentCoords, const Matrix *transformDependentToMaster)
void ComposeInto(Matrix *C, const Matrix &A, const Matrix &B)
void SetTranslationMatrix(Matrix *m, const Vector &v, int n)
void ApplyTransformation(Vector *v, const Matrix &m)
void RigidBodyFit(int natx, const Vector *const *xref, const Vector *const *xvar, const double *weights, Vector &cgref, Vector &cgvar, Matrix &rotMat)