.. oe:namespace:: OEShape

.. meta::
   :keywords: OEOrientByMomentsOfInertia

.. oe:function:: OEOrientByMomentsOfInertia

   .. oe:language:: c++ java csharp

      .. oe:api::

         unsigned int OEOrientByMomentsOfInertia(OEChem::OEMolBase & argMol,
                                                 OEChem::OETrans& argTransform,
                                                 const double argThreshold = 0.15)
         unsigned int OEOrientByMomentsOfInertia(OESystem::OEScalarGrid& argGrid,
                                                 OEChem::OETrans& argTransform,
                                                 const double argThreshold = 0.15)
         unsigned int OEOrientByMomentsOfInertia(OEShapeQuery& argQuery,
                                                 OEChem::OETrans& argTransform,
                                                 const double argThreshold = 0.15)

   .. oe:language:: python

      .. oe:api:: python

         OEOrientByMomentsOfInertia(argMol: Union[OEGraphMol,OEMol,OEQMol],
                                    argTransform: OETrans,
                                    argThreshold: float = 0.15) -> int
         OEOrientByMomentsOfInertia(argGrid: OEScalarGrid,
                                    argTransform: OETrans,
                                    argThreshold: float = 0.15) -> int
         OEOrientByMomentsOfInertia(argQuery: OEShapeQuery,
                                    argTransform: OETrans,
                                    argThreshold: float = 0.15) -> int

   Calculate the transform required to move the object (the specified
   molecule, grid or the shape query) to the center of its inertial frame,
   and apply the transform to move the object to the inertial frame. Method
   returns the moments symmetry of the object defined in the
   :oe:constns:`OEShape::OEMomentSymmetry` namespace.
   The transform required to get the object back into the original frame
   is returned in the second argument of the method.
