"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer2/MmtfMoleculeReader.cpp" between
pymol-v2.1.0.tar.bz2 and pymol-open-source-2.2.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

MmtfMoleculeReader.cpp  (pymol-v2.1.0.tar.bz2):MmtfMoleculeReader.cpp  (pymol-open-source-2.2.0)
skipping to change at line 25 skipping to change at line 25
#include <algorithm> #include <algorithm>
#include "AssemblyHelpers.h" #include "AssemblyHelpers.h"
#include "AtomInfo.h" #include "AtomInfo.h"
#include "Err.h" #include "Err.h"
#include "Lex.h" #include "Lex.h"
#include "MemoryDebug.h" #include "MemoryDebug.h"
#include "Rep.h" #include "Rep.h"
const int ss_map[] = { const char ss_map[] = {
// indices shifted by +1 w.r.t. spec
0, // undefined
'H', // pi helix 'H', // pi helix
'L', // bend 'L', // bend
'H', // alpha helix 'H', // alpha helix
'S', // extended 'S', // extended
'H', // 3-10 helix 'H', // 3-10 helix
'S', // bridge 'S', // bridge
'L', // turn 'L', // turn
'L', // coil 'L', // coil
0 0
}; };
skipping to change at line 210 skipping to change at line 212
LexAssign(G, tai.segi, container->chainIdList[chainIndex]); LexAssign(G, tai.segi, container->chainIdList[chainIndex]);
int chainGroupCount = container->groupsPerChain[chainIndex]; int chainGroupCount = container->groupsPerChain[chainIndex];
// groups (residues) // groups (residues)
for (int k = 0; k < chainGroupCount; ++k, ++groupIndex) { for (int k = 0; k < chainGroupCount; ++k, ++groupIndex) {
const MMTF_GroupType * group = const MMTF_GroupType * group =
container->groupList + container->groupList +
container->groupTypeList[groupIndex]; container->groupTypeList[groupIndex];
if (container->secStructList) if (container->secStructList) {
tai.ssType[0] = ss_map[container->secStructList[groupIndex]]; size_t i = container->secStructList[groupIndex] + 1;
tai.ssType[0] = ss_map[std::min(i, sizeof(ss_map) - 1)];
}
LexAssign(G, tai.resn, group->groupName); LexAssign(G, tai.resn, group->groupName);
tai.hetatm = group->singleLetterCode == '?'; tai.hetatm = group->singleLetterCode == '?';
tai.flags = tai.hetatm ? cAtomFlag_ignore : 0; tai.flags = tai.hetatm ? cAtomFlag_ignore : 0;
if (use_auth) { if (use_auth) {
tai.resv = container->groupIdList[groupIndex]; tai.resv = container->groupIdList[groupIndex];
if (container->insCodeList) if (container->insCodeList)
tai.setInscode(container->insCodeList[groupIndex]); tai.setInscode(container->insCodeList[groupIndex]);
} else if (container->sequenceIndexList) { } else if (container->sequenceIndexList) {
tai.resv = container->sequenceIndexList[groupIndex]; tai.resv = container->sequenceIndexList[groupIndex];
} }
// bonds // bonds
for (int l = 0, offset = atomIndex; l < group->bondAtomListCount / 2; ++ l) { for (int l = 0, offset = atomIndex; l < group->bondAtomListCount / 2; ++ l) {
VLACheck(I->Bond, BondType, I->NBond); // PYMOL-3026
BondTypeInit2(I->Bond + (I->NBond++), BondTypeInit2(I->Bond + (I->NBond++),
offset + group->bondAtomList[l * 2], offset + group->bondAtomList[l * 2],
offset + group->bondAtomList[l * 2 + 1], offset + group->bondAtomList[l * 2 + 1],
group->bondOrderListCount ? group->bondOrderList[l] : 1); group->bondOrderListCount ? group->bondOrderList[l] : 1);
} }
int groupAtomCount = group->atomNameListCount; int groupAtomCount = group->atomNameListCount;
// atoms // atoms
for (int l = 0; l < groupAtomCount; ++l, ++atomIndex) { for (int l = 0; l < groupAtomCount; ++l, ++atomIndex) {
skipping to change at line 292 skipping to change at line 297
if (atomIndex != I->NAtom) { if (atomIndex != I->NAtom) {
PRINTFB(G, FB_ObjectMolecule, FB_Warnings) PRINTFB(G, FB_ObjectMolecule, FB_Warnings)
" MMTF-Inconsistency-Warning: atom count mismatch (%d != numAtoms=%d)\n", " MMTF-Inconsistency-Warning: atom count mismatch (%d != numAtoms=%d)\n",
atomIndex, I->NAtom ENDFB(G); atomIndex, I->NAtom ENDFB(G);
} }
AtomInfoPurge(G, &tai); AtomInfoPurge(G, &tai);
for (int l = 0; l < container->bondAtomListCount / 2; ++l) { for (int l = 0; l < container->bondAtomListCount / 2; ++l) {
VLACheck(I->Bond, BondType, I->NBond); // PYMOL-3026
BondTypeInit2(I->Bond + (I->NBond++), BondTypeInit2(I->Bond + (I->NBond++),
container->bondAtomList[l * 2], container->bondAtomList[l * 2],
container->bondAtomList[l * 2 + 1], container->bondAtomList[l * 2 + 1],
container->bondOrderListCount ? container->bondOrderList[l] : 1); container->bondOrderListCount ? container->bondOrderList[l] : 1);
} }
if (container->numBonds != I->NBond) { if (container->numBonds != I->NBond) {
PRINTFB(G, FB_ObjectMolecule, FB_Warnings) PRINTFB(G, FB_ObjectMolecule, FB_Warnings)
" MMTF-Inconsistency-Warning: bond count mismatch (%d != numBonds=%d)\n", " MMTF-Inconsistency-Warning: bond count mismatch (%d != numBonds=%d)\n",
I->NBond, container->numBonds ENDFB(G); I->NBond, container->numBonds ENDFB(G);
 End of changes. 4 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)