diff --git a/modules/mol/alg/pymod/export_superpose_frames.cc b/modules/mol/alg/pymod/export_superpose_frames.cc new file mode 100644 index 0000000000000000000000000000000000000000..e1d55652052388dbf7721f6d030fbe6ef0cbe79f --- /dev/null +++ b/modules/mol/alg/pymod/export_superpose_frames.cc @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2010 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + +/* + * Author Marco Biasini + */ +#include <boost/python.hpp> +using namespace boost::python; +#include <ost/mol/alg/superpose_frames.hh> + +using namespace ost; +using namespace ost::mol::alg; + +void export_SuperposeFrames() +{ + def("SuperposeFrames", &SuperposeFrames); +} + diff --git a/modules/mol/base/pymod/export_coord_frame.cc b/modules/mol/base/pymod/export_coord_frame.cc new file mode 100644 index 0000000000000000000000000000000000000000..a63486e2a5aa4dd29487c787e609e7e430f4a5b5 --- /dev/null +++ b/modules/mol/base/pymod/export_coord_frame.cc @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2011 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ +#include <boost/python.hpp> +using namespace boost::python; + +#include <ost/mol/coord_frame.hh> +#include <ost/geom/Vec3.hh> +#include <ost/mol/entity_handle.hh> + +using namespace ost; +using namespace ost::mol; + +geom::Vec3 (CoordFrame::*get_atom_pos)(const AtomHandle& atom) = &CoordFrame::GetAtomPos; +Real (CoordFrame::*get_dist_atom)(const AtomHandle& a1, const AtomHandle& a2) = &CoordFrame::GetDistanceBetwAtoms; +Real (CoordFrame::*get_angle)(const AtomHandle& a1, const AtomHandle& a2, const AtomHandle& a3) = &CoordFrame::GetAngle; +Real (CoordFrame::*get_dihedral)(const AtomHandle& a1, const AtomHandle& a2, const AtomHandle& a3, const AtomHandle& a4) = &CoordFrame::GetDihedralAngle; +geom::Vec3 (CoordFrame::*get_cm)(const mol::EntityView& sele) = &CoordFrame::GetCenterOfMassPos; +Real (CoordFrame::*get_dist_cm)(const mol::EntityView& sele1, const mol::EntityView& sele2) = &CoordFrame::GetDistanceBetwCenterOfMass; +Real (CoordFrame::*get_rmsd)(const mol::EntityView& Reference_View, const mol::EntityView& sele_View) = &CoordFrame::GetRMSD; + + +void export_CoordFrame() +{ + class_<CoordFrame>("CoordFrame",no_init) + .def("GetAtomPos", get_atom_pos) + .def("GetDistanceBetwAtoms", get_dist_atom) + .def("GetAngle", get_angle) + .def("GetDihedralAngle", get_dihedral) + .def("GetCenterOfMassPos", get_cm) + .def("GetDistanceBetwCenterOfMass", get_dist_cm) + .def("GetRMSD",get_rmsd) + ; + def("CreateCoordFrame",CreateCoordFrame); +}