Menu

#263 minimum bounding box

v14
open
nobody
None
Normal
2023-05-24
2023-05-19
No

Hello, Jmol developers and users

I'm interested in building a minimum bounding box of the vdw isosurface of molecule.
The default setting for bounding box of the vdw isosurface is defined by the minimum and maximum coordinate values of the vdw isosurface.
This bounding box is not a minimum bounding box.
Could you please teach me to build a minimum bounding box of the vdw isosurface with a sample Jmol script ?

Thanks for advice,
Sawada

Related

Feature Requests: #263

Discussion

  • Angel Herraez

    Angel Herraez - 2023-05-19

    Hello, Toshihiko
    Could you please define more precisely what is yor idea of "minimum" bounding box?
    Based on atom coordinates rather than vdW sphere outer coordinates, maybe?


    [feature-requests:#263]https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

    Status: open
    Group: v14
    Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
    Last Updated: Fri May 19, 2023 05:54 AM UTC
    Owner: nobody

    Hello, Jmol developers and users

    I'm interested in building a minimum bounding box of the vdw isosurface of molecule.
    The default setting for bounding box of the vdw isosurface is defined by the minimum and maximum coordinate values of the vdw isosurface.
    This bounding box is not a minimum bounding box.
    Could you please teach me to build a minimum bounding box of the vdw isosurface with a sample Jmol script ?

    Thanks for advice,
    Sawada


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jmol/feature-requests/263/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Feature Requests: #263

  • Bob Hanson

    Bob Hanson - 2023-05-19

    You mean "best" in any orientation, not just xyz axes?

    On Fri, May 19, 2023, 12:54 AM Toshihiko Sawada gif220@users.sourceforge.net wrote:


    [feature-requests:#263]
    https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

    Status: open
    Group: v14
    Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
    Last Updated: Fri May 19, 2023 05:54 AM UTC
    Owner: nobody

    Hello, Jmol developers and users

    I'm interested in building a minimum bounding box of the vdw isosurface of
    molecule.
    The default setting for bounding box of the vdw isosurface is defined by
    the minimum and maximum coordinate values of the vdw isosurface.
    This bounding box is not a minimum bounding box.
    Could you please teach me to build a minimum bounding box of the vdw
    isosurface with a sample Jmol script ?

    Thanks for advice,
    Sawada


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/jmol/feature-requests/263/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Feature Requests: #263

  • Toshihiko Sawada

    Hi, Angel and Bob

    Thank you so much for response and discussion.
    To share the idea, i post samples of Jmol command (CASE 1 and 2), input file (sample_S.pdb), and BoundingBox.jpg (CASE 1-3).

    -- i am able to build a bounding box of molecular vdW sphere (see CASE 2), BUT this bounding box is not the "minimum" bounding box.
    -- Minimum bounding box is defined as the minimal volume oriented bounding 3D box.
    -- CASE3.jpg illustrates my freehand-made minimum bounding box. My goal is an automatic building of this minimum bounding box by using Jmol and Jmol script.
    -- Algorithms to find the minimum bounding 3D box are reported. but it is too difficult for me to implement the algorithm in Jmol.

    CASE 1. default setting of bounding box of molecule

    $ load sample_S.pdb
    $ boundbox on
    $ show boundbox
    boundbox {10.139999 -11.542 -0.0024999976} {18.886 16.107 0.99050003}
    boundbox corners {-8.746 -27.649 -0.99300003} {29.026 4.5650005 0.98800004} # volume = 2410.4556

    -> CASE1_BoundingBox.jpg

    CASE 2. default setting of bounding box of molecular vdW sphere

    $ load sample_S.pdb
    $ isosurface ISO resolution 6 color white vdw sasurface 0
    $ boundbox $ISO
    $ boundbox on
    $ show boundbox
    boundbox {10.140104 -11.5915365 0.017665863} {19.9828 17.255083 2.1100953}
    boundbox corners {-9.842695 -28.846619 -2.0924294} {30.122904 5.6635475 2.1277611} # volume = 5820.569

    -> CASE2_BoundingBox_vdW_sphere.jpg

    CASE 3. the minimum bounding box of molecular vdW sphere

    i illustrate freehand-made minimum bounding box of molecular vdW sphere by using image editor.
    My goal is an automatic building of this minimum bounding box by using Jmol and Jmol script.

    -> CASE3_BoundingBox_vdW_sphere_freehand_minimum.jpg

    Thanks for advice,
    Sawada

     
    • Farhad Gharagheizi

      Hi everyone

      Finding "minimum perimeter bounding box" is one of the famous optimization
      problems. So, as far as I know, there is no way you can do that in Jmole as
      Jmol has not been designed to go that deep in optimization methods.

      In a previous study (https://pubs.acs.org/doi/abs/10.1021/acsami.2c12485),
      I applied Jmol to read the structure file and to export the xyz coordinates
      to a text file. I then applied the MATLAB Global Optimization Toolbox to
      read the coordinates and to calculate the minimum perimeter bounding
      vertices/edges. You find an algorith and write your own code to do that
      (There are many algorithms for the problem. You should look for the one
      that works more efficiently. ). I managed to do this in a batch mode and
      in a parallel mode for over 20,000 periodic Metal-Organic gigantic
      structures in a couple of days.

      I hope this helps and this finds you well.

      Best regards

      Farhad

      On Sun, May 21, 2023 at 9:43 AM Toshihiko Sawada gif220@users.sourceforge.net wrote:

      Hi, Angel and Bob

      Thank you so much for response and discussion.
      To share the idea, i post samples of Jmol command (CASE 1 and 2), input
      file (sample_S.pdb), and BoundingBox.jpg (CASE 1-3).

      -- i am able to build a bounding box of molecular vdW sphere (see CASE 2),
      BUT this bounding box is not the "minimum" bounding box.
      -- Minimum bounding box is defined as the minimal volume oriented bounding
      3D box.
      -- CASE3.jpg illustrates my freehand-made minimum bounding box. My goal is
      an automatic building of this minimum bounding box by using Jmol and Jmol
      script.
      -- Algorithms to find the minimum bounding 3D box are reported. but it is
      too difficult for me to implement the algorithm in Jmol.

      CASE 1. default setting of bounding box of molecule

      $ load sample_S.pdb
      $ boundbox on
      $ show boundbox
      boundbox {10.139999 -11.542 -0.0024999976} {18.886 16.107 0.99050003}
      boundbox corners {-8.746 -27.649 -0.99300003} {29.026 4.5650005
      0.98800004} # volume = 2410.4556

      -> CASE1_BoundingBox.jpg

      CASE 2. default setting of bounding box of molecular vdW sphere

      $ load sample_S.pdb
      $ isosurface ISO resolution 6 color white vdw sasurface 0
      $ boundbox $ISO
      $ boundbox on
      $ show boundbox
      boundbox {10.140104 -11.5915365 0.017665863} {19.9828 17.255083 2.1100953}
      boundbox corners {-9.842695 -28.846619 -2.0924294} {30.122904 5.6635475
      2.1277611} # volume = 5820.569

      -> CASE2_BoundingBox_vdW_sphere.jpg

      CASE 3. the minimum bounding box of molecular vdW sphere

      i illustrate freehand-made minimum bounding box of molecular vdW sphere by
      using image editor.
      My goal is an automatic building of this minimum bounding box by using
      Jmol and Jmol script.

      -> CASE3_BoundingBox_vdW_sphere_freehand_minimum.jpg

      Thanks for advice,
      Sawada

      Attachments:


      [feature-requests:#263]
      https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

      Status: open
      Group: v14
      Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
      Last Updated: Fri May 19, 2023 05:54 AM UTC
      Owner: nobody

      Hello, Jmol developers and users

      I'm interested in building a minimum bounding box of the vdw isosurface of
      molecule.
      The default setting for bounding box of the vdw isosurface is defined by
      the minimum and maximum coordinate values of the vdw isosurface.
      This bounding box is not a minimum bounding box.
      Could you please teach me to build a minimum bounding box of the vdw
      isosurface with a sample Jmol script ?

      Thanks for advice,
      Sawada


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jmol/feature-requests/263/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #263

      • Angel Herraez

        Angel Herraez - 2023-05-21

        Hello, Sawada

        Not perfect, but it approximates to what you are looking for (at least wih your example molecule):

        rotate selected best;
        boundbox {all};

        The 1st command changes the coordinates of all atoms.
        The 2nd forces a recalculation of the boundbox to the new coordinates.

        Not sure how it will work with other molecules.

         
        • Toshihiko Sawada

          Post awaiting moderation.
  • Toshihiko Sawada

    Post awaiting moderation.
  • Bob Hanson

    Bob Hanson - 2023-05-22

    Jmol can do this. But it is specifically designed for orienting molecules in the "best" orientation. It does so by testing a set of 1495 quaternion-based orientations. So it is not a formal mathematical "best" box. But it is pretty close.

    As Angel points out, that means that you can rotate the molecule to the "best" orientation using the ROTATE SELECTED option, which does change the coordinates, by the way.

    rotate SELECTED BEST

    and if you then create a temporary vdw surface, you can create the bounding box for that using

    isosurface ID s VDW
    boundbox $s
    isosurface ID s delete

    I'm curious what your use case is here. What is your plan for this bounding box? Do you just need its corner coordinates? Its volume? Just making a nice-looking box? Or are you doing this for some other purpose?

     
    • Toshihiko Sawada

      Hi, Bob, Angel, Farhad and all

      thank you so much for your advice and opinions.
      i have confirmed the workings of Jmol commands "rotate selected best", and accepted this approach as the second best of.

      Thank you again for your time.
      Sawada

       
      • Michael

        Michael - 2023-05-23

        Sawada,

        i have confirmed the workings of Jmol commands
        "rotate selected best", and accepted this approach
        as the second best of.

        How will you use bounding box?

        Miguel

        On Tue, May 23, 2023 at 02:57 Toshihiko Sawada gif220@users.sourceforge.net
        wrote:

        Hi, Bob, Angel, Farhad and all

        thank you so much for your advice and opinions.
        i have confirmed the workings of Jmol commands "rotate selected best", and
        accepted this approach as the second best of.

        Thank you again for your time.
        Sawada


        [feature-requests:#263]
        https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

        Status: open
        Group: v14
        Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
        Last Updated: Mon May 22, 2023 11:39 PM UTC
        Owner: nobody

        Hello, Jmol developers and users

        I'm interested in building a minimum bounding box of the vdw isosurface of
        molecule.
        The default setting for bounding box of the vdw isosurface is defined by
        the minimum and maximum coordinate values of the vdw isosurface.
        This bounding box is not a minimum bounding box.
        Could you please teach me to build a minimum bounding box of the vdw
        isosurface with a sample Jmol script ?

        Thanks for advice,
        Sawada


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/jmol/feature-requests/263/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         

        Related

        Feature Requests: #263

        • Toshihiko Sawada

          Hi, Bob, Michael, and all

          The minimum bounding box (MBB) of the molecule descripts its molecular dimensions.
          In many cases, molecular dimensions are related to molecular properties.
          Calculation of MBB with molecular design will motivate chemists to control molecular properties.

          Sawada

           
          • Bob Hanson

            Bob Hanson - 2023-05-23

            Ah. Ok. So it is the calculation not the visual. Then we need the vdw
            isosurface and just the calculation of the box. And not do the quaternion
            rotation itself at all.

            And we would need to figure out how good the quaternion analysis is,
            perhaps allowing for a high precision option.

            That is doable. How exacting does it need to be?

            Do you already know of a quaternion solution?

            The reason to go with quaternions is that they provide an unbiased sampling
            of orientation.

            Not that I have any time at all for this right now....

            On Tue, May 23, 2023, 7:00 AM Toshihiko Sawada gif220@users.sourceforge.net
            wrote:

            Hi, Bob, Michael, and all

            The minimum bounding box (MBB) of the molecule descripts its molecular
            dimensions.
            In many cases, molecular dimensions are related to molecular properties.
            Calculation of MBB with molecular design will motivate chemists to control
            molecular properties.

            Sawada

            [feature-requests:#263]
            https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

            Status: open
            Group: v14
            Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
            Last Updated: Tue May 23, 2023 12:57 AM UTC
            Owner: nobody

            Hello, Jmol developers and users

            I'm interested in building a minimum bounding box of the vdw isosurface of
            molecule.
            The default setting for bounding box of the vdw isosurface is defined by
            the minimum and maximum coordinate values of the vdw isosurface.
            This bounding box is not a minimum bounding box.
            Could you please teach me to build a minimum bounding box of the vdw
            isosurface with a sample Jmol script ?

            Thanks for advice,
            Sawada


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/jmol/feature-requests/263/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

             

            Related

            Feature Requests: #263

          • Farhad Gharagheizi

            Toshihiko

            I am not still convinced with the solution Bob offered because it is not
            clear how Jmol does calculate the box and whether there is a mathematical
            proof that it ends with the minimum bounding box.
            As I mentioned in my earlier email, finding the minimum perimeter bounding
            box is a well-discussed optimization problem. In order for it to be used as
            a molecular descriptor/property, the method must give the real minimum
            bounding box not just an approximated vale of that.

            Best regards

            Farhad

            On Tue, May 23, 2023 at 8:00 AM Toshihiko Sawada gif220@users.sourceforge.net wrote:

            Hi, Bob, Michael, and all

            The minimum bounding box (MBB) of the molecule descripts its molecular
            dimensions.
            In many cases, molecular dimensions are related to molecular properties.
            Calculation of MBB with molecular design will motivate chemists to control
            molecular properties.

            Sawada

            [feature-requests:#263]
            https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

            Status: open
            Group: v14
            Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
            Last Updated: Tue May 23, 2023 12:57 AM UTC
            Owner: nobody

            Hello, Jmol developers and users

            I'm interested in building a minimum bounding box of the vdw isosurface of
            molecule.
            The default setting for bounding box of the vdw isosurface is defined by
            the minimum and maximum coordinate values of the vdw isosurface.
            This bounding box is not a minimum bounding box.
            Could you please teach me to build a minimum bounding box of the vdw
            isosurface with a sample Jmol script ?

            Thanks for advice,
            Sawada


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/jmol/feature-requests/263/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

             

            Related

            Feature Requests: #263

  • Toshihiko Sawada

    Hi, Bob, Farhad, and to whom are interested in MBB of molecule

    Thank you for your interest in the Minimum-perimeter Bounding Box (MBB) of molecule.
    I would like to cooperate in implementation of MBB calculation function to Jmol with keeping the original Jmol license (the GNU Lesser General Public License).

    I agree with Farhad's suggestions. We need to search the reported mathematical algorithms with their approximations in advance of the implementation. There is offen a trade-off between computational complexity and accuracy.

    To Bob and Jmol developers:
    Would it be possible to set a formal discussion room more closed than this sourceforge room ?
    this sourceforge room is too open...

    Best regards,
    Toshihiko Sawada

     
    • Bob Hanson

      Bob Hanson - 2023-05-25

      Sure. Switch to private email for a start.

       
      • Bob Hanson

        Bob Hanson - 2023-05-25

        Ps my naive intuition is that this problem as an adequate approximation is
        just the minimization of the desired metric on a quaternion S2 sphere,
        which suggests that an incrementally increasing geodesic search should pin
        it down sufficiently rapidly.

        I'm surprised I'm not seeing a quaternion based algorithm out there.

        That would be relatively easy to implement in Jmol for testing and
        visualization of the solution space. And for validation.

         
        • Bob Hanson

          Bob Hanson - 2023-06-12

          I have developed a simplex method using quaternions that is proving
          interesting. It allows visualization of the "minimum bounding box
          landscape" For example, with $isopranol, I can see this minimum box

          [image: image.png]
          and a quaternion landscape that looks like this:
          [image: image.png]
          This indicates multiple very nearly minimal bounding boxes. It's part of a
          much larger set, where the colors here indicate volume, with red being
          smallest:
          [image: image.png]
          (this is 20000 samples)

          On Thu, May 25, 2023 at 6:55 PM Bob Hanson hansonr@users.sourceforge.net
          wrote:

          Ps my naive intuition is that this problem as an adequate approximation is
          just the minimization of the desired metric on a quaternion S2 sphere,
          which suggests that an incrementally increasing geodesic search should pin
          it down sufficiently rapidly.

          I'm surprised I'm not seeing a quaternion based algorithm out there.

          That would be relatively easy to implement in Jmol for testing and
          visualization of the solution space. And for validation.


          [feature-requests:#263]
          https://sourceforge.net/p/jmol/feature-requests/263/ minimum bounding box

          Status: open
          Group: v14
          Created: Fri May 19, 2023 05:54 AM UTC by Toshihiko Sawada
          Last Updated: Wed May 24, 2023 02:41 AM UTC
          Owner: nobody

          Hello, Jmol developers and users

          I'm interested in building a minimum bounding box of the vdw isosurface of
          molecule.
          The default setting for bounding box of the vdw isosurface is defined by
          the minimum and maximum coordinate values of the vdw isosurface.
          This bounding box is not a minimum bounding box.
          Could you please teach me to build a minimum bounding box of the vdw
          isosurface with a sample Jmol script ?

          Thanks for advice,
          Sawada


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/jmol/feature-requests/263/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

          --
          Robert M. Hanson
          Professor of Chemistry
          St. Olaf College
          Northfield, MN
          http://www.stolaf.edu/people/hansonr

          If nature does not answer first what we want,
          it is better to take what answer we get.

          -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

          We stand on the homelands of the Wahpekute Band of the Dakota Nation. We
          honor with gratitude the people who have stewarded the land throughout the
          generations and their ongoing contributions to this region. We acknowledge
          the ongoing injustices that we have committed against the Dakota Nation,
          and we wish to interrupt this legacy, beginning with acts of healing and
          honest storytelling about this place.

           

          Related

          Feature Requests: #263


Log in to post a comment.