Hi Oliver, Ricardo,

  I added a "cube" option to molmap command.  If cube is true then the grid integer size will be made equal along all 3 axes and even. If cube is specified as an integer then the grid size will be that size along all 3 axes. If cube is an integer and gridSpacing is specified then the edgePadding option is ignored and the map is made with the specified grid size and grid spacing and may not cover the entire molecule.  By default cube is false.  I don't want to change the command default behavior since this command has been in use for decades in Chimera and ChimeraX.  Also I'm not sure the cube case is the most common use.

  Examples

molmap #1 3 cube true
molmap #1 3 cube 128
molmap #1 3 cube 128 gridSpacing 0.5

  Tom


On Sep 13, 2024, at 10:19 AM, Ricardo Righetto <ricardorighetto@gmail.com> wrote:

Thanks Oli for raising this issue and Tom for the quick response!

To add to this, I think the "cube true" option (whether it's the default or not) should also default to an even box size (rounding up), since that's what most EM packages expect. Or at least add an extra option "even true", if that's more appropriate.

Best wishes,

--
Ricardo Diogo Righetto


Em sex., 13 de set. de 2024 às 16:10, Oliver Clarke via ChimeraX-users <chimerax-users@cgl.ucsf.edu> escreveu:
Wonderful, thanks Tom! I wonder if it would be worth considering having it default to true? Having rectangular maps does save a little bit of disk space, but for most use cases in EM at least having cubic maps is worth the tradeoff. But possibly there are more cases where having it default to a minimal bounding box is better, I don't know for sure. Thanks again

Cheers
Oli

> On Sep 13, 2024, at 2:25 AM, Tom Goddard <goddard@sonic.net> wrote:
>
> Hi Oliver,
>
>  I agree.  I think adding an option to molmap like "cube true" to make it add appropriate padding to make the box a cube would be the best approach.  That's probably pretty easy and I'll try to add it soon.  Thanks for the suggestion.
>
>       Tom
>
>> On Sep 12, 2024, at 5:53 PM, Oliver Clarke via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>>
>> Hi,
>>
>> Currently, molmap defaults to creating the new map in a minimal bounding box - a minimal rectangular prism.
>>
>> Most cryoEM software doesn't like rectangular prisms, and rather prefers cubes (ideally with sides that are an even number of voxels).
>>
>> Would it be possible to either (a) alter molmap so it defaults to a minimal cubic box or (b) add an option to automatically resample to a cubic box of specified dimensions? Often this doesn't really matter as we have a map already loaded that we can resample on the grid of, but it would be convenient to be able to do this in a single command.
>>
>> Cheers
>> Oli
>> _______________________________________________
>> ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
>> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
>> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
>>
>


_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/