• RE: Finding distance between two planes

    Hi Richard,

    That's amazing - thank you.  I'm currently only interested in perfectly parallel planes, so the h.measurements bit is perfect for what I want (and working brilliantly!).  When (if?) I extend to nearly parallel planes I will look at the centroid-plane distances.

    Thanks so much for your help,


  • RE: Finding distance between two planes

    Hi Richard,

    Thanks for this.  As Mercury now allows measurement of the distance between two planes I was hoping that it would also be in the API.

    Anyway, I tried your suggestion, and got the error:

    AttributeError: 'SubstructureSearch' object has no attribute 'add_point_plane_distance'

    Any ideas on what I might be doing wrong?



  • Finding distance between two planes

    I'm new to the Python API, so please don't assume any knowledge!

    I'd like to measure a distance between two molecules.  The molecules are roughly planar, so I have defined the planes of each molecule, and I want to find the perpendicular distnace between the planes.  I can find the angle between the planes (which is usually 0, and if it's not 0 I realise that I can't measure the distance anyway).  How can I get the distance?  Below, the code is all working fine, except for the last line.





        sub1, 0,

        sub1, 1,

        sub1, 2,

        sub1, 3,

        sub1, 4,

        sub1, 5,

        sub1, 6,

        sub1, 7,

        sub1, 8)


        sub2, 0,

        sub2, 1,

        sub2, 2,

        sub2, 3,

        sub2, 4,

        sub2, 5,

        sub2, 6,

        sub2, 7,

        sub2, 8)

    substructure_search.add_plane_angle_measurement('ang3', 'P1', 'P2')

    substructure_search.add_distance_measurement('sep1', 'P1', 'P2')