Hi Kyle,
So you want to extract a cube shaped region of a density map containing a PDB model. If you are using vop zone then the values are set to zero outside the zone distance. Using the “minimalBounds” option you get a rectangular box instead of a cube. From that non-cube box you want to extend the two shorter dimensions to equal the size (in grid points) of the longest of the x,y,z dimensions? That may involve extending beyond the bounds of the original map. The “vop cover” command can almost do what you want. It extends a map, mostly for handling unit cell and crystal symmetries, but you can turn off the symmetry handling. So if you have an extracted rectangular map of size (96, 101, 88) and you want make it size (101,101,101) with zero padding, the following command does this
vop cover #0 ibox -2,0,-6,98,100,94 useSymmetry false cellSize 200,200,200
documentation here
The trouble is that the integers you need to use depend on the original rectangular size. I’ve attached a Python script cube.py that will do this — you would run it as a Chimera command like
run /tmp/cube.py #0
and it will in turn run the appropriate vop cover command.
Tom