"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer3/PlugIOManager.cpp" between
pymol-open-source-2.2.0.tar.gz and pymol-open-source-2.3.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.

PlugIOManager.cpp  (pymol-open-source-2.2.0):PlugIOManager.cpp  (pymol-open-source-2.3.0)
skipping to change at line 400 skipping to change at line 400
ms->FDim[0] = v->xsize; ms->FDim[0] = v->xsize;
ms->FDim[1] = v->ysize; ms->FDim[1] = v->ysize;
ms->FDim[2] = v->zsize; ms->FDim[2] = v->zsize;
ms->FDim[3] = 3; ms->FDim[3] = 3;
ms->Grid = Alloc(float, 3); ms->Grid = Alloc(float, 3);
ms->Dim = Alloc(int, 3); ms->Dim = Alloc(int, 3);
ms->Origin = Calloc(float, 3); ms->Origin = Calloc(float, 3);
ms->Range = Alloc(float, 3); ms->Range = Alloc(float, 3);
// special case: orthogonal & cartesian-aligned
// -> don't use State.Matrix which causes trouble for e.g. CCP4 expo
rt
// (non-standard header) and ObjectSlice (incomplete implementation)
bool aligned_axes =
fabs(v->xaxis[1]) <= R_SMALL4 && fabs(v->xaxis[2]) <= R_SMALL4 &&
fabs(v->yaxis[0]) <= R_SMALL4 && fabs(v->yaxis[2]) <= R_SMALL4 &&
fabs(v->zaxis[0]) <= R_SMALL4 && fabs(v->zaxis[1]) <= R_SMALL4;
// set corners to a unit cube, and manage world space with the state matrix // set corners to a unit cube, and manage world space with the state matrix
{ if (!aligned_axes) {
PRINTFB(G, FB_ObjectMap, FB_Warnings)
" Warning: Axes not aligned, using map-state matrix\n" ENDFB(G);
double m44d[16]; double m44d[16];
if(!ms->State.Matrix) if(!ms->State.Matrix)
ms->State.Matrix = Alloc(double, 16); ms->State.Matrix = Alloc(double, 16);
// state matrix transformation // state matrix transformation
identity44d(m44d); identity44d(m44d);
copy3(v->xaxis, m44d + 0); copy3(v->xaxis, m44d + 0);
copy3(v->yaxis, m44d + 4); copy3(v->yaxis, m44d + 4);
copy3(v->zaxis, m44d + 8); copy3(v->zaxis, m44d + 8);
skipping to change at line 441 skipping to change at line 452
// (redundant) // (redundant)
ms->Dim[a] = ms->FDim[a]; ms->Dim[a] = ms->FDim[a];
// corner enumeration // corner enumeration
for(int b = 0; b < 8; b++) for(int b = 0; b < 8; b++)
ms->Corner[3 * b + a] = (b >> a) & 0x1; ms->Corner[3 * b + a] = (b >> a) & 0x1;
} }
} }
if (aligned_axes) {
ms->Grid[0] = v->xaxis[0] / (ms->FDim[0] - 1);
ms->Grid[1] = v->yaxis[1] / (ms->FDim[1] - 1);
ms->Grid[2] = v->zaxis[2] / (ms->FDim[2] - 1);
for(int a = 0; a < 3; a++) {
ms->Origin[a] = v->origin[a];
ms->Range[a] = ms->Grid[a] * (ms->Dim[a] - 1);
ms->ExtentMin[a] = ms->Origin[a];
ms->ExtentMax[a] = ms->Origin[a] + ms->Grid[a] * ms->Max[a];
}
// corners
for(int c = 0, d = 0; c < ms->FDim[2]; c += ms->FDim[2] - 1) {
float v[3];
v[2] = ms->Origin[2] + ms->Grid[2] * c;
for(int b = 0; b < ms->FDim[1]; b += ms->FDim[1] - 1) {
v[1] = ms->Origin[1] + ms->Grid[1] * b;
for(int a = 0; a < ms->FDim[0]; a += ms->FDim[0] - 1, ++d) {
v[0] = ms->Origin[0] + ms->Grid[0] * a;
copy3f(v, ms->Corner + 3 * d);
}
}
}
}
// field // field
ms->Field = IsosurfFieldAlloc(G, ms->FDim); ms->Field = IsosurfFieldAlloc(G, ms->FDim);
ms->MapSource = cMapSourceVMDPlugin; ms->MapSource = cMapSourceVMDPlugin;
ms->Field->save_points = false; /* save points in RAM only, not session file */ ms->Field->save_points = false; /* save points in RAM only, not session file */
ms->Active = true; ms->Active = true;
ObjectMapStateRegeneratePoints(ms); ObjectMapStateRegeneratePoints(ms);
// copy data // copy data
{ {
 End of changes. 3 change blocks. 
1 lines changed or deleted 39 lines changed or added

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