00001 #------------------------------------------------------------------------------ 00002 # This file is part of the OpenStructure project <www.openstructure.org> 00003 # 00004 # Copyright (C) 2008-2011 by the OpenStructure authors 00005 # 00006 # This library is free software; you can redistribute it and/or modify it under 00007 # the terms of the GNU Lesser General Public License as published by the Free 00008 # Software Foundation; either version 3.0 of the License, or (at your option) 00009 # any later version. 00010 # This library is distributed in the hope that it will be useful, but WITHOUT 00011 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 # details. 00014 # 00015 # You should have received a copy of the GNU Lesser General Public License 00016 # along with this library; if not, write to the Free Software Foundation, Inc., 00017 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 #------------------------------------------------------------------------------ 00019 from _ost_mol import * 00020 import ost.geom as _geom 00021 from ost.mol import alg 00022 00023 00024 def Transform(tf=None): 00025 from ost import LogWarning 00026 if Transform.mol_transform_warning_flag: 00027 LogWarning("mol.Transform is deprecated, please use geom.Transform instead") 00028 Transform.mol_transform_warning_flag=False 00029 if tf: 00030 return _geom.Transform(tf) 00031 else: 00032 return _geom.Transform() 00033 Transform.mol_transform_warning_flag=True 00034 00035 def MergeCoordGroups(*coord_groups): 00036 """ 00037 Merge several separate coord groups into one. The coord groups must have the 00038 same number of atoms. In case no coord group is supplied, None will be 00039 returned. 00040 """ 00041 if len(coord_groups)==0: 00042 return None 00043 cg=CreateCoordGroup(coord_groups[0].atoms) 00044 for coord_group in coord_groups: 00045 cg.AddFrames(coord_group) 00046 return cg
1.6.1