mgltools-symserv-1.5.7~rc1~cvs.20130519/0000755000175000017500000000000012146213444016742 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/setup.py0000644000175000017500000000624211102640341020447 0ustar debiandebian#!/usr/bin/env python from distutils.core import setup from distutils.command.sdist import sdist from distutils.command.install_data import install_data from glob import glob import os ######################################################################## # Had to overwrite the prunrefile_list method of sdist to not # remove automatically the RCS/CVS directory from the distribution. ######################################################################## class modified_sdist(sdist): def prune_file_list(self): """ Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically 'build') * the release tree itself (only an issue if we ran 'sdist previously with --keep-temp, or it aborted) """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) class modified_install_data(install_data): def run(self): install_cmd = self.get_finalized_command('install') self.install_dir = getattr(install_cmd, 'install_lib') return install_data.run(self) ######################################################################## # list of the python packages to be included in this distribution. # sdist doesn't go recursively into subpackages so they need to be # explicitaly listed. # From these packages only the python modules will be taken packages = ['symserv', 'symserv.VisionInterface', 'symserv.VisionInterface.Tests'] # list of the python modules not part of a package. Give the path and the # filename without the extension. i.e you want to add the # test.py module which is located in MyPack/Tests/ you give # 'MyPack/Tests/test' py_modules = [] # list of the files that are not python packages but are included in the # distribution and need to be installed at the proper place by distutils. # The list in MANIFEST.in lists is needed for including those files in # the distribution, data_files in setup.py is needed to install them # at the right place. data_files = [] for dir in ['symserv', 'symserv/CVS', 'symserv/VisionInterface/CVS', 'symserv/VisionInterface/Tests/CVS']: files = [] for f in glob(os.path.join(dir, '*')): if f[-3:] != '.py' and f[-4:-1] != '.py' and os.path.isfile(f): files.append(f) data_files.append((dir, files)) # description of what is going to be included in the distribution and # installed. from version import VERSION setup (name = 'symserv', version = VERSION, description = "Symetry server", author = 'Molecular Graphics Laboratory', author_email = 'sanner@scripps.edu', download_url = 'http://www.scripps.edu/~sanner/software/packager.html', url = 'http://www.scripps.edu/~sanner/software/index.html', packages = packages, py_modules = py_modules, data_files = data_files, cmdclass = {'sdist': modified_sdist, 'install_data': modified_install_data }, ) mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/0000755000175000017500000000000012146213446020454 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/0000755000175000017500000000000012146213446023544 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/SymservWidgets.py0000644000175000017500000004660711001507621027120 0ustar debiandebian######################################################################## # # Date: Nov 2001 Authors: Daniel Stoffler, Michel Sanner # # stoffler@scripps.edu # sanner@scripps.edu # # Copyright: Daniel Stoffler, Michel Sanner and TSRI # ######################################################################### from NetworkEditor.widgets import TkPortWidget, PortWidget from mglutil.gui.BasicWidgets.Tk.xyzGUI import xyzGUI from mglutil.gui.BasicWidgets.Tk.thumbwheel import ThumbWheel from mglutil.util.callback import CallbackManager import Tkinter, string, math class VectEntry(Tkinter.Frame): """ this widget is a specialized Entry for typing in vector values. A setValue() method has been added which checks that the input is correct. The vector is used *as is* and will not be normalized """ def __init__(self, master=None, label=None, width=18, callback=None, **kw): Tkinter.Frame.__init__(self, master) Tkinter.Pack.config(self) self.var = Tkinter.StringVar() self.frame = Tkinter.Frame(self) if label and label != '': d={'fg':'black','text':label} self.tklabel = apply(Tkinter.Label, (self.frame,), d) self.tklabel.pack() kw['width']=width self.tkwidget = apply( Tkinter.Entry, (self.frame,), kw ) self.tkwidget.bind('', self.setValue_cb) self.tkwidget.pack() self.tkwidget['textvariable'] = self.var self.point = [0., 0, 0] self.text = '0 0 0' self.frame.pack(side='top', expand=1) self.myCallback = callback self.callbacks = CallbackManager() if self.myCallback: self.callbacks.AddCallback(self.myCallback) def setValue_cb(self, event=None): v = self.var.get() try: val = string.split(v) except: self.updateField() return if val is None or len(val)!= 3: self.updateField() return try: oldtext = self.text self.text = v self.point=[] self.point.append(float(val[0])) self.point.append(float(val[1])) self.point.append(float(val[2])) self.text = `self.point[0]`+' '+`self.point[1]`+' '+\ `self.point[2]` self.var.set(self.text) self.callbacks.CallCallbacks(self.point) except: self.text = oldtext self.updateField() def updateField(self): self.var.set(self.text) # used in XYZVectGUI below class NormVectEntry(VectEntry): """ this widget is a specialized Entry for typing in vector values. A setValue() method has been added which checks that the input is correct. The vector is normalized """ def __init__(self, master=None, label=None, width=18, callback=None, **kw): VectEntry.__init__(self, master, label, width, callback) def setValue_cb(self, event=None): v = self.var.get() try: val = string.split(v) except: self.updateField() return if val is None or len(val)!= 3: self.updateField() return try: oldtext = self.text self.point=[] self.point.append(float(val[0])) self.point.append(float(val[1])) self.point.append(float(val[2])) # compute normalized vector n = math.sqrt(self.point[0]*self.point[0]+\ self.point[1]*self.point[1]+\ self.point[2]*self.point[2]) if n == 0.0: self.point = [0.0, 0.0, 1.0] else: v = [self.point[0]/n, self.point[1]/n, self.point[2]/n] self.point = v self.text = `self.point[0]`+' '+`self.point[1]`+' '+\ `self.point[2]` self.var.set(self.text) self.callbacks.CallCallbacks(self.point) except: self.text = oldtext self.updateField() def get(self): return self.point def set(self, value): #called when node is loaded self.text = `value[0]`+' '+`value[1]`+' '+`value[2]` self.var.set(self.text) self.point = value class XYZVectGUI(xyzGUI): def __init__(self, master=None, name='VectXYZ', callback=None, callbackX=None, widthX=100, heightX=26, wheelPadX=4, labcfgX={'text':None}, widthY=100, heightY=26, wheelPadY=4, labcfgY={'text':None}, callbackY=None, widthZ=100, heightZ=26, wheelPadZ=4, callbackZ=None, labcfgZ={'text':None}, **kw): xyzGUI.__init__(self, master, name, callback, callbackX, widthX, heightX, wheelPadX, labcfgX, widthY, heightY, wheelPadY, labcfgY, callbackY, widthZ, heightZ, wheelPadZ, callbackZ, labcfgZ) def createEntries(self, master): self.f = Tkinter.Frame(master) self.f.grid(column=1, rowspan=6) self.entryX = NormVectEntry(master=self.f, label='Vector X', width=18) self.entryX.grid(row=0,column=0) self.entryX.callbacks.AddCallback(self.entryX_cb) self.thumbx = ThumbWheel(master=self.f, width=self.widthX, height=self.heightX, labcfg=self.labcfgX, wheelPad=self.wheelPadX) self.thumbx.callbacks.AddCallback(self.thumbx_cb) self.thumbx.grid(row=1, column=0) self.entryY = NormVectEntry(master=self.f, label='Vector Y', width=18) self.entryY.grid(row=2,column=0) self.entryY.callbacks.AddCallback(self.entryY_cb) self.thumby = ThumbWheel(master=self.f, width=self.widthY, height=self.heightY, labcfg=self.labcfgY, wheelPad=self.wheelPadY) self.thumby.callbacks.AddCallback(self.thumby_cb) self.thumby.grid(row=3, column=0) self.entryZ = NormVectEntry(master=self.f, label='Vector Z', width=18) self.entryZ.grid(row=4,column=0) self.entryZ.callbacks.AddCallback(self.entryZ_cb) self.thumbz = ThumbWheel(master=self.f, width=self.widthZ, height=self.heightZ, labcfg=self.labcfgZ, wheelPad=self.wheelPadZ) self.thumbz.callbacks.AddCallback(self.thumbz_cb) self.thumbz.grid(row=5, column=0) self.f.pack(side='top', expand=1) self.setVector([1.0,0,0],'x') self.setVector([0.0,1,0],'y') self.setVector([0.0,0,1],'z') def set(self, x, y, z, v1, v2, v3): # called from outside self.thumbx.setValue(x) self.thumby.setValue(y) self.thumbz.setValue(z) self.entryX.set(v1) self.entryY.set(v2) self.entryZ.set(v3) def entryX_cb(self, events=None): self.callbacks.CallCallbacks(self.entryX.point) def entryY_cb(self, events=None): self.callbacks.CallCallbacks(self.entryY.point) def entryZ_cb(self, events=None): self.callbacks.CallCallbacks(self.entryZ.point) ##################################################################### # the 'configure' methods: ##################################################################### def configure(self, **kw): for key,value in kw.items(): # the 'set parameter' callbacks if key=='labcfgX': self.setLabel(value,'x') elif key=='labcfgY': self.setLabel(value,'y') elif key=='labcfg': self.setLabel(value,'z') elif key=='continuousX': self.setContinuous(value,'x') elif key=='continuousY': self.setContinuous(value,'y') elif key=='continuousZ': self.setContinuous(value,'z') elif key=='precisionX': self.setPrecision(value,'x') elif key=='precisionY': self.setPrecision(value,'y') elif key=='precisionZ': self.setPrecision(value,'z') elif key=='typeX': self.setType(value,'x') elif key=='typeY': self.setType(value,'y') elif key=='typeZ': self.setType(value,'z') elif key=='minX': self.setMin(value,'x') elif key=='minY': self.setMin(value,'y') elif key=='minZ': self.setMin(value,'z') elif key=='maxX': self.setMax(value,'x') elif key=='maxY': self.setMax(value,'y') elif key=='maxZ': self.setMax(value,'z') elif key=='oneTurnX': self.setOneTurn(value,'x') elif key=='oneTurnY': self.setOneTurn(value,'y') elif key=='oneTurnZ': self.setOneTurn(value,'z') elif key=='showLabelX': self.setShowLabel(value,'x') elif key=='showLabelY': self.setShowLabel(value,'y') elif key=='showLabelZ': self.setShowLabel(value,'z') elif key=='incrementX': self.setIncrement(value,'x') elif key=='incrementY': self.setIncrement(value,'y') elif key=='incrementZ': self.setIncrement(value,'z') elif key=='vectX' : self.setVector(value,'x') elif key=='vectY' : self.setVector(value,'y') elif key=='vectZ' : self.setVector(value,'z') #################################################### elif key=='lockTypeX': self.lockType(value,'x') elif key=='lockTypeY': self.lockType(value,'y') elif key=='lockTypeZ': self.lockType(value,'z') elif key=='lockMinX': self.lockMin(value,'x') elif key=='lockMinY': self.lockMin(value,'y') elif key=='lockMinZ': self.lockMin(value,'z') elif key=='lockBMinX': self.lockBMin(value,'x') elif key=='lockBMinY': self.lockBMin(value,'y') elif key=='lockBMinZ': self.lockBMin(value,'z') elif key=='lockMaxX': self.lockMax(value,'x') elif key=='lockMaxY': self.lockMax(value,'y') elif key=='lockMaxZ': self.lockMax(value,'z') elif key=='lockBMaxX': self.lockBMax(value,'x') elif key=='lockBMaxY': self.lockBMax(value,'y') elif key=='lockBMaxZ': self.lockBMax(value,'z') elif key=='lockIncrementX': self.lockIncrement(value,'x') elif key=='lockIncrementY': self.lockIncrement(value,'y') elif key=='lockIncrementZ': self.lockIncrement(value,'z') elif key=='lockBIncrementX': self.lockBIncrement(value,'x') elif key=='lockBIncrementY': self.lockBIncrement(value,'y') elif key=='lockBIncrementZ': self.lockBIncrement(value,'z') elif key=='lockPrecisionX': self.lockPrecision(value,'x') elif key=='lockPrecisionY': self.lockPrecision(value,'y') elif key=='lockPrecisionZ': self.lockPrecision(value,'z') elif key=='lockShowLabelX': self.lockShowLabel(value,'x') elif key=='lockShowLabelY': self.lockShowLabel(value,'y') elif key=='lockShowLabelZ': self.lockShowLabel(value,'z') elif key=='lockValueX': self.lockValue(value,'x') elif key=='lockValueY': self.lockValue(value,'y') elif key=='lockValueZ': self.lockValue(value,'z') elif key=='lockContinuousX': self.lockContinuous(value,'x') elif key=='lockContinuousY': self.lockContinuous(value,'y') elif key=='lockContinuousZ': self.lockContinuous(value,'z') elif key=='lockOneTurnX': self.lockOneTurn(value,'x') elif key=='lockOneTurnY': self.lockOneTurn(value,'y') elif key=='lockOneTurnZ': self.lockOneTurn(value,'z') def setVector(self, value, mode): if mode == 'x': self.entryX.set(value) if mode == 'y': self.entryY.set(value) if mode == 'z': self.entryZ.set(value) class NEXYZVectGUI(TkPortWidget): # description of parameters that can only be used with the widget's # constructor configOpts = PortWidget.configOpts.copy() ownConfigOpts = { 'widthX':{'min':1, 'max':500, 'type':'int', 'defaultValue':100}, 'heightX':{'min':1, 'max':500, 'type':'int', 'defaultValue':26}, 'wheelPadX':{'min':1, 'max':500, 'type':'int', 'defaultValue':4}, 'labcfgX':{'type':'dict','defaultValue':{ 'text':'length X', 'side':'left'}}, 'widthY':{'min':1, 'max':500, 'type':'int', 'defaultValue':100}, 'heightY':{'min':1, 'max':500, 'type':'int', 'defaultValue':26}, 'wheelPadY':{'min':1, 'max':500, 'type':'int', 'defaultValue':4}, 'labcfgY':{'type':'dict','defaultValue':{ 'text':'length Y', 'side':'left'}}, 'widthZ':{'min':1, 'max':500, 'type':'int', 'defaultValue':100}, 'heightZ':{'min':1, 'max':500, 'type':'int', 'defaultValue':26}, 'wheelPadZ':{'min':1, 'max':500, 'type':'int', 'defaultValue':4}, 'labcfgZ':{'type':'dict','defaultValue':{ 'text':'length Z', 'side':'left'}}, } configOpts.update( ownConfigOpts ) def __init__(self, port, **kw): # create all attributes that will not be created by configure because # they do not appear on kw for key in self.ownConfigOpts.keys(): v = kw.get(key, None) if v is None: # self.configure will not do anyting for this key setattr(self, key, self.ownConfigOpts[key]['defaultValue']) # get all arguments handled by NEThumbweel and not by PortWidget widgetcfg = {} for k in self.ownConfigOpts.keys(): if k in kw: widgetcfg[k] = kw.pop(k) # call base class constructor apply( PortWidget.__init__, ( self, port), kw) # create the Thumbwheel widget self.widget = apply( XYZVectGUI, (self.widgetFrame,), widgetcfg) self.widget.callbacks.AddCallback(self.newValueCallback) # configure without rebuilding to avoid enless loop apply( self.configure, (False,), widgetcfg) if self.initialValue: self.set(self.initialValue, run=0) self.modified = False # will be set to True by configure method def get(self): return (self.widget.thumbx.value, self.widget.thumby.value, \ self.widget.thumbz.value, self.widget.entryX.point, \ self.widget.entryY.point, self.widget.entryZ.point) def set(self, val, run=1): if val is not None: self._setModified(True) self.widget.set(val[0],val[1],val[2],val[3],val[4],val[5]) if self.port.network.runOnNewData.value is True and run: self.port.node.schedule() def getConstructorOptions(self): cfg = PortWidget.getConstructorOptions(self) cfg['labcfgX'] = self.widget.thumbx.labcfg cfg['callbackX'] = self.widget.thumbx.myCallback cfg['widthX'] = self.widget.thumbx.width cfg['heightX'] = self.widget.thumbx.height cfg['wheelPadX'] = self.widget.thumbx.wheelPad cfg['labcfgY'] = self.widget.thumby.labcfg cfg['callbackY'] = self.widget.thumby.myCallback cfg['widthY'] = self.widget.thumby.width cfg['heightY'] = self.widget.thumby.height cfg['wheelPadY'] = self.widget.thumby.wheelPad cfg['labcfgZ'] = self.widget.thumbz.labcfg cfg['callbackZ'] = self.widget.thumbz.myCallback cfg['widthZ'] = self.widget.thumbz.width cfg['heightZ'] = self.widget.thumbz.height cfg['wheelPadZ'] = self.widget.thumbz.wheelPad cfg.update(self.configure()) return cfg def getDescr(self): cfg = PortWidget.getDescr(self) typex = self.widget.thumbx.type if typex == int: cfg['typeX'] = 'int' else: cfg['typeX'] = 'float' typey = self.widget.thumby.type if typey == int: cfg['typeY'] = 'int' else: cfg['typeY'] = 'float' typez = self.widget.thumbz.type if typez == int: cfg['typeZ'] = 'int' else: cfg['typeZ'] = 'float' cfg['continuousX'] = self.widget.thumbx.continuous cfg['continuousY'] = self.widget.thumby.continuous cfg['continuousZ'] = self.widget.thumbz.continuous cfg['precisionX'] = self.widget.thumbx.precision cfg['precisionY'] = self.widget.thumby.precision cfg['precisionZ'] = self.widget.thumbz.precision cfg['minX'] = self.widget.thumbx.min cfg['minY'] = self.widget.thumby.min cfg['minZ'] = self.widget.thumbz.min cfg['maxX'] = self.widget.thumbx.max cfg['maxY'] = self.widget.thumby.max cfg['maxZ'] = self.widget.thumbz.max cfg['oneTurnX'] = self.widget.thumbx.oneTurn cfg['oneTurnY'] = self.widget.thumby.oneTurn cfg['oneTurnZ'] = self.widget.thumbz.oneTurn cfg['showLabelX'] = self.widget.thumbx.showLabel cfg['showLabelY'] = self.widget.thumby.showLabel cfg['showLabelZ'] = self.widget.thumbz.showLabel cfg['incrementX'] = self.widget.thumbx.increment cfg['incrementY'] = self.widget.thumby.increment cfg['incrementZ'] = self.widget.thumbz.increment cfg['vectX'] = self.widget.entryX.point cfg['vectY'] = self.widget.entryY.point cfg['vectZ'] = self.widget.entryZ.point ############################################## cfg['lockTypeX'] = self.widget.thumbx.lockType cfg['lockTypeY'] = self.widget.thumby.lockType cfg['lockTypeZ'] = self.widget.thumbz.lockType cfg['lockMinX'] = self.widget.thumbx.lockMin cfg['lockMinY'] = self.widget.thumby.lockMin cfg['lockMinZ'] = self.widget.thumbz.lockMin cfg['lockBMinX'] = self.widget.thumbx.lockBMin cfg['lockBMinY'] = self.widget.thumby.lockBMin cfg['lockBMinZ'] = self.widget.thumbz.lockBMin cfg['lockMaxX'] = self.widget.thumbx.lockMax cfg['lockMaxY'] = self.widget.thumby.lockMax cfg['lockMaxZ'] = self.widget.thumbz.lockMax cfg['lockBMaxX'] = self.widget.thumbx.lockBMax cfg['lockBMaxY'] = self.widget.thumby.lockBMax cfg['lockBMaxZ'] = self.widget.thumbz.lockBMax cfg['lockIncrementX'] = self.widget.thumbx.lockIncrement cfg['lockIncrementY'] = self.widget.thumby.lockIncrement cfg['lockIncrementZ'] = self.widget.thumbz.lockIncrement cfg['lockBIncrementX'] = self.widget.thumbx.lockBIncrement cfg['lockBIncrementY'] = self.widget.thumby.lockBIncrement cfg['lockBIncrementZ'] = self.widget.thumbz.lockBIncrement cfg['lockPrecisionX'] = self.widget.thumbx.lockPrecision cfg['lockPrecisionY'] = self.widget.thumby.lockPrecision cfg['lockPrecisionZ'] = self.widget.thumbz.lockPrecision cfg['lockShowLabelX'] = self.widget.thumbx.lockShowLabel cfg['lockShowLabelY'] = self.widget.thumby.lockShowLabel cfg['lockShowLabelZ'] = self.widget.thumbz.lockShowLabel cfg['lockValueX'] = self.widget.thumbx.lockValue cfg['lockValueY'] = self.widget.thumby.lockValue cfg['lockValueZ'] = self.widget.thumbz.lockValue cfg['lockContinuousX'] = self.widget.thumbx.lockContinuous cfg['lockContinuousY'] = self.widget.thumby.lockContinuous cfg['lockContinuousZ'] = self.widget.thumbz.lockContinuous cfg['lockOneTurnX'] = self.widget.thumbx.lockOneTurn cfg['lockOneTurnY'] = self.widget.thumby.lockOneTurn cfg['lockOneTurnZ'] = self.widget.thumbz.lockOneTurn return cfg mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/SymservNodes.py0000644000175000017500000017014411300626447026566 0ustar debiandebian## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by ######################################################################### # # Date: Nov 2001 Authors: Daniel Stoffler, Michel Sanner # # stoffler@scripps.edu # sanner@scripps.edu # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Daniel Stoffler, Michel Sanner and TSRI # ######################################################################### import warnings import numpy.oldnumeric as Numeric, math, types from mglutil.math.rotax import rotax from NetworkEditor.items import NetworkNode from NetworkEditor.macros import MacroNode from Vision import UserLibBuild from symserv.symOperators import SymNFold, SymTrans, SymTransXYZ, SymRot,\ SymHelix, SymMerge, SymMultiply, SymSplit, CenterOfMass, SymOrient,\ ApplyTransfToCoords, PDBtoMatrix, SymScale, SymTranspose,SymInverse,\ DistanceBetweenTwoPoints, SymSuperHelix from symserv.VisionInterface.SymservWidgets import NEXYZVectGUI def ToList(matricesList): """turns a list of lists of 4x4 matrices into a list of 4x4 matrices. This is used to remove the additional list created because all instanceMatrices input ports of the nodes in thei file are NOT singleConnection by default. """ if matricesList is None: return None # if the port is singleConnection we do not have an additional list if len(matricesList) and type(matricesList[0])!=types.ListType: return matricesList mats = [] for m in matricesList: mats.extend(m) return mats def importMolKitLib(net): try: ed = net.getEditor() from MolKit.VisionInterface.MolKitNodes import molkitlib ed.addLibraryInstance( molkitlib, 'MolKit.VisionInterface.MolKitNodes', 'molkitlib') except: warnings.warn( 'Warning! Could not import molitlib from MolKit.VisionInterface') def importVizLib(net): try: ed = net.getEditor() from DejaVu.VisionInterface.DejaVuNodes import vizlib ed.addLibraryInstance( vizlib, 'DejaVu.VisionInterface.DejaVuNodes', 'vizlib') except: warnings.warn( 'Warning! Could not import vizlib from DejaVu/VisionInterface') class SaveToFile(NetworkNode): """ save a list of instance matrices to a file input: matrices: instance matrices filename: name of the file in which to save """ def __init__(self, name='Save', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.widgetDescr['filename'] = { 'class':'NEEntryWithFileSaver', 'master':'node', 'width':16, 'initialValue':'', 'labelCfg':{'text':'Filename: '} } ip = self.inputPortsDescr ip.append(datatype='string', name='filename') ip.append(datatype='instancemat(0)', name='matrices') code = """def doit(self, filename, matrices): from symserv.utils import saveInstancesMatsToFile if filename: saveInstancesMatsToFile(filename, matrices) """ if code: self.setFunction(code) class ReadFromFile(NetworkNode): """ read a list of instance matrices from a file input: filename: name of the file in which to save output: matrices: instance matrices """ def __init__(self, name='Save', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.widgetDescr['filename'] = { 'class':'NEEntryWithFileBrowser', 'master':'node', 'width':16, 'initialValue':'', 'labelCfg':{'text':'Filename: '} } ip = self.inputPortsDescr ip.append(datatype='string', name='filename') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='matrices') code = """def doit(self, filename): from symserv.utils import readInstancesMatsFromFile if filename: mats = readInstancesMatsFromFile(filename) if mats: self.outputData(matrices=mats) """ if code: self.setFunction(code) class Identity(NetworkNode): """Create a stream of transformation set to identity""" def __init__(self, name='Identity', symmetry=1, **kw): kw['name']=name kw['symmetry'] = symmetry apply( NetworkNode.__init__, (self,), kw) self.widgetDescr['copies'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':10, 'precision':3, 'increment':1, 'type':'int', 'min':1, 'lockBMin':0,'lockType':1,'lockIncrement':1, 'lockBIncrement':1, 'lockMin':1, 'master':'node', 'initValue':1.0, 'labelCfg':{'text':'# copies'}, 'widgetGridCfg':{'labelSide':'top'}, } ip = self.inputPortsDescr ip.append(datatype='int', name='copies') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') code = """def doit(self, copies): result = [] for i in xrange(copies): result.append(Numeric.identity(4, 'f')) self.outputData(outMatrices=result) """ if code: self.setFunction(code) from mglutil.math.rotax import rotVectToVect class AlignVectToVect(NetworkNode): """Create a stream of rotations that align 3D vectors""" def __init__(self, name='Vect2Vect', symmetry=1, **kw): kw['name']=name kw['symmetry'] = symmetry apply( NetworkNode.__init__, (self,), kw) ip = self.inputPortsDescr ip.append(datatype='None', name='vect1') ip.append(datatype='None', name='vect2') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') code = """def doit(self, vect1, vect2): from math import sqrt try: vect1[0][0] vect1_1D=False except: vect1_1D=True try: vect2[0][0] vect2_1D=False except: vect2_1D=True if vect1_1D+vect2_1D == 1: if vect1_1D: vect1 = list([vect1])*len(vect2) else: vect2 = list([vect2])*len(vect1) if not (vect1_1D or vect2_1D): assert len(vect1[0])==3 assert len(vect2[0])==3 result = [] for i in xrange(len(vect1)): v1 = vect1[i] v2 = vect2[i] n1 = 1.0/sqrt(v1[0]*v1[0] + v1[1]*v1[1] + v1[2]*v1[2]) n2 = 1.0/sqrt(v2[0]*v2[0] + v2[1]*v2[1] + v2[2]*v2[2]) v1 = (v1[0]*n1, v1[1]*n1, v1[2]*n1) v2 = (v2[0]*n2, v2[1]*n2, v2[2]*n2) result.append( Numeric.array( rotVectToVect(v1, v2), 'f') ) else: v1 = vect1 v2 = vect2 n1 = 1.0/sqrt(v1[0]*v1[0] + v1[1]*v1[1] + v1[2]*v1[2]) n2 = 1.0/sqrt(v2[0]*v2[0] + v2[1]*v2[1] + v2[2]*v2[2]) v1 = (v1[0]*n1, v1[1]*n1, v1[2]*n1) v2 = (v2[0]*n2, v2[1]*n2, v2[2]*n2) result = [Numeric.array( rotVectToVect(v1, v2 ), 'f')] self.outputData(outMatrices=result) """ if code: self.setFunction(code) class PerurbVectorNE(NetworkNode): """randomly modifies vector usiing gaussian distribution Input: vector: initial vector sigma: standard deviation of Gaussian Output: vector: modified vector """ def __init__(self, name='PerurbVector', **kw): kw['name'] = name apply( NetworkNode.__init__, (self,), kw ) self.vector = None ip = self.inputPortsDescr ip.append(datatype='none', name='vector') ip.append(datatype='float', name='sigma', defaultValue=.3) ip.append(datatype='bool', name='normalize', defaultValue=1) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1,'mode':'XY', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'vector'}, 'initialValue':[1.,0,0]} self.widgetDescr['sigma'] = { 'class':'NEThumbWheel', 'master':'node', 'width':80, 'height':20, 'type':'float', 'wheelPad':1, 'initialValue':0.3, 'labelGridCfg':{'sticky':'w'}, 'widgetGridCfg':{'sticky':'w', 'columnspan':2}, 'labelCfg':{'text':'sigma:'}, } self.widgetDescr['normalize'] = { 'class':'NECheckButton', 'master':'node', 'initialValue':1, 'labelCfg':{'text':'normalize'}, } op = self.outputPortsDescr op.append(datatype='none', name='vector') code = """def doit(self, vector, sigma, normalize): if self.inputPorts[0].hasNewValidData(): self.vector = vector x, y, z = self.vector from random import gauss self.vector = (gauss(x, sigma), gauss(y, sigma), gauss(z,sigma)) if normalize: x, y, z = self.vector from math import sqrt n = 1./sqrt(x*x + y*y + z*z) self.vector = (x*n, y*n, z*n) self.outputData(vector = self.vector) """ self.setFunction(code) class SymNFoldNode(NetworkNode): """To be subclassed""" def __init__(self, name='Prototype', symmetry=1, **kw): kw['name']=name kw['symmetry'] = symmetry apply( NetworkNode.__init__, (self,), kw) self.operator = SymNFold( (1,0,0), (0,0,0), symmetry, 1 ) code = """def doit(self, matrices, vector, point, identity): matrices = ToList(matrices) self.operator.set(vector=vector, point=point, symmetry=%d, identity=identity) result = self.operator(matrices) self.outputData(outMatrices=result)\n"""%symmetry if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1,'mode':'XY', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':str(symmetry)+'-fold vector'}, 'initialValue':[1.,0,0]} #'vector':[1.,0,0] } self.widgetDescr['point'] = { 'class':'NEVectEntry', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'Point'}, 'initialValue':[0., 0., 0.], } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':1, 'labelGridCfg':{'sticky':'we'}, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='None', required=False, name='point') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class Sym2FoldNE(SymNFoldNode): """Apply a 2-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='Sym2Fold', **kw): kw['name']=name kw['symmetry'] = 2 apply( SymNFoldNode.__init__, (self,), kw) class Sym3FoldNE(SymNFoldNode): """Apply a 3-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='Sym3Fold', **kw): kw['name']=name kw['symmetry'] = 3 apply( SymNFoldNode.__init__, (self,), kw) class Sym4FoldNE(SymNFoldNode): """Apply a 4-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='Sym4Fold', **kw): kw['name']=name kw['symmetry'] = 4 apply( SymNFoldNode.__init__, (self,), kw) class Sym5FoldNE(SymNFoldNode): """Apply a 5-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='Sym5Fold', **kw): kw['name']=name kw['symmetry'] = 5 apply( SymNFoldNode.__init__, (self,), kw) class Sym6FoldNE(SymNFoldNode): """Apply a 6-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='Sym6Fold', **kw): kw['name']=name kw['symmetry'] = 6 apply( SymNFoldNode.__init__, (self,), kw) class SymNFoldNE(NetworkNode): """Apply an N-fold symmetry to an incoming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The symmetry axis is controlled by a vector gui located in the node parameter panel. Additionally, a center of origin can be specified as well as the number of symmetries. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='SymNFold', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymNFold( (1,0,0), (0,0,0), 1, 1 ) code = """def doit(self, matrices, vector, point, symmetry, identity): matrices = ToList(matrices) self.operator.set(vector=vector, point=point, symmetry=symmetry, identity=identity) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1,'mode':'XY', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'n-fold vector'}, 'initialValue':[1.,0,0] } #'vector':[1.,0,0] } self.widgetDescr['point'] = { 'class':'NEVectEntry', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'Point'}, 'initialValue':[1.,0,0], } self.widgetDescr['symmetry'] = { 'class':'NEDial','size':100, 'type':'int', 'min':1, 'lockMin':1, 'lockBMin':1, 'lockType':1, 'oneTurn':10, 'initialValue':1, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'# symetries'}, } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':1, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='None', required=False, name='point') ip.append(datatype='int', required=False, name='symmetry') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymTransNE(NetworkNode): """Apply a translation to an incomming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The axis of translation is controlled by a vector gui widget and the lenght of the vector by a thumbwheel widget located in the parameter panel. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='SymTranslation', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymTrans( (1.0,0.0,0.0), 0.0, 0 ) code = """def doit(self, matrices, vector, length, identity): matrices = ToList(matrices) self.operator.set(vector=vector, identity=identity,length=length) result = self.operator(matrices) self.outputData(outMatrices=result) """ if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2,'labelSide':'top'}, 'labelCfg':{'text':''},'continuous':1, 'initialValue':[1.,0,0] } self.widgetDescr['length'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':1, 'precision':3, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'vector length:'}, } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':0, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='None', required=False, name='length') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymTransXYZNE(NetworkNode): """Apply a translation to an incomming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices. The axis of translation is controlled by a vector gui widget and the lenght of the vector by a thumbwheel widget located in the parameter panel. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='SymTranslationXYZ', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymTransXYZ( (0,0,0, (0,0,0),(0,0,0),(0,0,0)),0 ) code = """def doit(self, matrices, vector, identity): matrices = ToList(matrices) self.operator.set(data=vector, identity=identity) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEXYZVectGUI', 'vectX':'1 0 0','vectY':'0 1 0','vectZ':'0 0 1', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':''}, } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':0, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymRotNE(NetworkNode): """Apply a rotation to an incomming stream of 4x4 matrices. The node then outputs a list of 4x4 matrices, concatenated with any incoming matrices.The axis of rotation is controlled by a vector gui widget located in the parameter panel. Additionally, a center of origin can be specified as well as the rotation angle. The identity checkbutton controls whether the identity matrix is added or not. """ def __init__(self, name='SymRotation', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymRot( (1,0,0), (0,0,0), 0, 0 ) code = """def doit(self, matrices, vector, point, angle, identity): matrices = ToList(matrices) self.operator.set(vector=vector, point=point, angle=angle, identity=identity) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'rot. axis'}, 'initialValue':[1.,0,0] } self.widgetDescr['point'] = { 'class':'NEVectEntry', 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'Point'}, 'initialValue':[0.,0,0] } self.widgetDescr['angle'] = { 'class':'NEDial', 'size':100, 'type':'float', 'oneTurn':360, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'angle'}, } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':0, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='None', required=False, name='point') ip.append(datatype='float', required=False, name='angle') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymHelixNE(NetworkNode): """Generates a helix. Helix parameters are controlled by a VectorGUI widget located in the parameter panel Input: matrices: matrices to be pre-multiplied with the helical transformation vector: the 3-D vector defining the oriention of the helical axis point: a 3-D point defining the location in space of the helical axis angle: angular value in degrees between 2 consecutive copies hrise: displacement along the helical axis between 2 consecutive copies copies: number of transformations """ def __init__(self, name='SymHelix', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymHelix( (0.,1.,0.), (0.,0.,0.), 0., 0., 1 ) code = """def doit(self, matrices, vector, point, angle, hrise, copies): matrices = ToList(matrices) self.operator.set(vector=vector, point=point, angle=angle, hrise=hrise, copies=copies) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) # FIXME: radius and increment are switched self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1, 'initialValue':[0.,1.,0], 'widgetGridCfg':{'labelSide':'top'}, 'labelCfg':{'text':'rot. axis'}, } self.widgetDescr['point'] = { 'class':'NEVectEntry', 'initialValue':[0.,0,0], 'widgetGridCfg':{'labelSide':'top'}, 'labelCfg':{'text':'point'}, } self.widgetDescr['angle'] = { 'class':'NEDial', 'size':100, 'oneTurn':360, 'type':'float', 'widgetGridCfg':{'labelSide':'top'}, 'labelCfg':{'text':'angle'}, } self.widgetDescr['hrise'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':1, 'precision':3, 'type':'float', 'initValue':1.0, 'widgetGridCfg':{'labelSide':'top'}, 'labelCfg':{'text':'rise'}, } self.widgetDescr['copies'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':10, 'precision':3, 'increment':1, 'type':'int', 'min':1, 'lockBMin':0,'lockType':1,'lockIncrement':1, 'lockBIncrement':1, 'lockMin':1, 'initValue':1.0, 'widgetGridCfg':{'labelSide':'top'}, 'labelCfg':{'text':'# copies'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='None', required=False, name='point') ip.append(datatype='float', required=False, name='angle') ip.append(datatype='float', required=False, name='hrise') ip.append(datatype='int', required=False, name='copies') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymSuperHelixNE(NetworkNode): """Generates a super helix. This is a helical arrangement (local helix) that follows a helical path (overall helix) Input: matrices: matrices to be pre-multiplied with the helical transformation vector1: the 3-D vector defining the oriention of the overal helical axis point1: a 3-D point defining the location in space of the helical axis angle1: angular value in degrees between 2 consecutive copies hrise1: displacement along the helical axis between 2 consecutive copies vector2: the 3-D vector defining the oriention of the local helical axis point2: a 3-D point defining the location in space of the helical axis angle2: angular value in degrees between 2 consecutive copies hrise2: displacement along the helical axis between 2 consecutive copies copies: number of transformations """ def __init__(self, name='SymSuperHelix', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymSuperHelix( (0.,1.,0.), (0.,0.,0.), 0., 0., (0.,0.,1.), (0.,0.,0.), 0., 0., 1 ) code = """def doit(self, matrices, vector1, point1, angle1, hrise1, vector2, point2, angle2, hrise2, copies): matrices = ToList(matrices) self.operator.set( vector=vector1, point=point1, angle=angle1, hrise=hrise1, vector2=vector2, point2=point2, angle2=angle2, hrise2=hrise2, copies=copies) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) # FIXME: radius and increment are switched self.widgetDescr['vector1'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1, 'initialValue':[0.,1.,0], 'widgetGridCfg':{'labelSide':'top', 'column':0, 'row':1}, 'labelCfg':{'text':'overall helical rot. axis'}, } self.widgetDescr['point1'] = { 'class':'NEVectEntry', 'initialValue':[0.,0,0], 'widgetGridCfg':{'labelSide':'top', 'column':0, 'row':3}, 'labelCfg':{'text':'overall helical axis point'}, } self.widgetDescr['angle1'] = { 'class':'NEDial', 'size':100, 'oneTurn':360, 'type':'float', 'widgetGridCfg':{'labelSide':'top', 'column':0, 'row':5}, 'labelCfg':{'text':'overall helical angle'}, } self.widgetDescr['hrise1'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':1, 'precision':3, 'type':'float', 'initValue':1.0, 'widgetGridCfg':{'labelSide':'top', 'column':0, 'row':7}, 'labelCfg':{'text':'overall helical rise'}, } self.widgetDescr['vector2'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1, 'initialValue':[0.,0.,1], 'widgetGridCfg':{'labelSide':'top', 'column':1, 'row':1}, 'labelCfg':{'text':'local helical rot. axis'}, } self.widgetDescr['point2'] = { 'class':'NEVectEntry', 'initialValue':[0.,0,0], 'widgetGridCfg':{'labelSide':'top', 'column':1, 'row':3}, 'labelCfg':{'text':'local helical axis point'}, } self.widgetDescr['angle2'] = { 'class':'NEDial', 'size':100, 'oneTurn':360, 'type':'float', 'widgetGridCfg':{'labelSide':'top', 'column':1, 'row':5}, 'labelCfg':{'text':'local helical angle'}, } self.widgetDescr['hrise2'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':1, 'precision':3, 'type':'float', 'initValue':1.0, 'widgetGridCfg':{'labelSide':'top', 'column':1, 'row':7}, 'labelCfg':{'text':'local helical rise'}, } self.widgetDescr['copies'] = { 'class':'NEThumbWheel', 'width':100, 'height':26, 'wheelPad':4, 'oneTurn':10, 'precision':3, 'increment':1, 'type':'int', 'min':1, 'lockBMin':0,'lockType':1,'lockIncrement':1, 'lockBIncrement':1, 'lockMin':1, 'initValue':1.0, 'widgetGridCfg':{'labelSide':'top', 'columnspan':2}, 'labelCfg':{'text':'# copies'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='None', required=False, name='vector1') ip.append(datatype='None', required=False, name='point1') ip.append(datatype='float', required=False, name='angle1') ip.append(datatype='float', required=False, name='hrise1') ip.append(datatype='None', required=False, name='vector2') ip.append(datatype='None', required=False, name='point2') ip.append(datatype='float', required=False, name='angle2') ip.append(datatype='float', required=False, name='hrise2') ip.append(datatype='int', required=False, name='copies') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymMergeNE(NetworkNode): """Merges incoming matrices""" def __init__(self, name='SymMerge', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymMerge() code = """def doit(self, matrices): matrices = ToList(matrices) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymMultiplyNE(NetworkNode): """SymMultiply multiplies incoming matrices and ouputs them. - 1 parent is multiplied with itself - 2 parents: two valid options: * either one of the parents has lenght 1 (1 matrix) which is then multiplied to all other matrices of the second parent, or * both parents have the same amount of matrices.""" def __init__(self, name='SymMultiply', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymMultiply() code = """def doit(self, stream1, stream2): if stream1 or stream2: if stream1: stream1 = stream1[0] if stream2: stream2 = stream2[0] result = self.operator(matA=stream1, matB=stream2) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='stream1') ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='stream2') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymTransposeNE(NetworkNode): """Transpose all incomming (4x4) matrices""" def __init__(self, name='Transpose', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) m=Numeric.identity(4).astype('f') self.operator = SymTranspose() code = """def doit(self, matrices): matrices = ToList(matrices) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', singleConnection=False, name='inMatrices') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymInverseNE(NetworkNode): """Inverse all incomming (4x4) matrices""" def __init__(self, name='Inverse', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) m=Numeric.identity(4).astype('f') self.operator = SymInverse() code = """def doit(self, matrices): matrices = ToList(matrices) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', singleConnection=False, name='inMatrices') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class SymSplitNE(NetworkNode): """unselected matrices of the incomming stream are sent to output port 0, selected matrices are sent to additional output ports which get created on selection. selection is done by specifying matrices comma separated indices in the incomming stream. Ranges can be specified using the ':' or '-' character. additional ports are created by using the ';' character. """ def __init__(self, name='SymSplit', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) m=Numeric.identity(4).astype('f') self.operator = SymSplit(m, "") self.result = None self.widgetDescr['entry'] = { 'class':'NEEntry', 'master':'node', 'width':12, 'labelCfg':{'text':'selector:'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=True, singleConnection=False, name='matrices') ip.append(datatype='string', required=False, name='entry') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices0') code = """def doit(self, matrices, entry): matrices = ToList(matrices) self.operator.set(matrices=matrices, chars=entry) self.result=self.operator(matrices,entry) self.addRemovePorts(len(self.result)) args = {} for i in range(len(self.result)): var='outMatrices'+`i` if len(self.result[i]) == 0: portData = [Numeric.identity(4).astype('f')] else: portData=self.result[i] args[var]=list(portData) apply(self.outputData, (), args)\n""" if code: self.setFunction(code) # to save and load the split node properly with all its outputPorts: # if we have more than 1 output port we save the source code of # this node (by setting self.modified = 1) if self.result > 1: for p in self.outputPorts: p._modified = True else: for p in self.outputPorts: p._modified = False def addRemovePorts(self, nb): dynamicOPortsDescr=[] if nb > len(self.outputPorts): # we add ports loop=nb-len(self.outputPorts) for i in range(loop): name="outMatrices"+`len(self.outputPorts)+i` dynamicOPortsDescr.append({ 'name': name, 'datatype':'instancemat'}) for kw in dynamicOPortsDescr: ip = apply( self.addOutputPort, (), kw ) self.outputPortsDescr = self.outputPortsDescr + dynamicOPortsDescr elif nb < len(self.outputPorts): # we remove ports for i in range(len(self.outputPorts), nb, -1): self.deletePort(self.outputPorts[i-1]) elif nb == len(self.outputPorts): return class CoMassNE(NetworkNode): """ inputs xyz coords, returns center of gravity """ def __init__(self, name='Center of Mass', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = CenterOfMass(None) code = """def doit(self, coords): if coords and len(coords): self.operator.set(coords=coords) result=self.operator() self.outputData(centerOfMass=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='coordinates3D', name='coords') op = self.outputPortsDescr op.append(datatype='list', name='centerOfMass') def beforeAddingToNetwork(self, net): # import vizlib importVizLib(net) class SymOrientNE(NetworkNode): """Apply a rotation to an incomming stream of 4x4 matrices The rotation is around the center of mass If the identity check button is checked this node will multiply the incoming matrices by the identity matrix and the rotation matrix, else only the rotation matrix is applied. The axis of rotation is controlled by a VectorGUI widget located in the parameter panel""" def __init__(self, name='SymOrient', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymOrient( [1,0,0], 0, [0,0,0], 0 ) code = """def doit(self, matrices, centerOfMass, vector, angle, identity): matrices = ToList(matrices) if centerOfMass and len(centerOfMass): self.operator.set(vector=vector, angle=angle, center=centerOfMass, identity=identity) result = self.operator(matrices) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) self.widgetDescr['vector'] = { 'class':'NEVectorGUI', 'size':100, 'continuous':1, 'initialValue':[1.,0,0], #'vector':[1.,0,0], 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'labelCfg':{'text':'rot. axis'}, } self.widgetDescr['angle'] = { 'class':'NEDial', 'size':100, 'labelGridCfg':{'columnspan':2}, 'widgetGridCfg':{'columnspan':2, 'labelSide':'top'}, 'oneTurn':360, 'type':'float', 'labelCfg':{'text':'angle'}, } self.widgetDescr['identity'] = { 'class':'NECheckButton', 'initialValue':0, 'labelCfg':{'text':'Identity'}, } ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') ip.append(datatype='list', required=False, name='centerOfMass') ip.append(datatype='None', required=False, name='vector') ip.append(datatype='float', required=False, name='angle') ip.append(datatype='int', required=False, name='identity') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') class ApplyTransfToCoordsNE(NetworkNode): """ inputs xyz coords, and matrices, returns transformed coords """ def __init__(self, name='Apply Transf to Coords', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = ApplyTransfToCoords([0.,0,0],None) code = """def doit(self, coords, matrices): if coords and len(coords) and matrices and len(matrices): matrices = ToList(matrices) self.operator.set(coords=coords, matrices=matrices) result=self.operator() self.outputData(coords=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='coordinates3D', name='coords') ip.append(datatype='instancemat(0)', required=False, singleConnection=False, name='matrices') op = self.outputPortsDescr op.append(datatype='coordinates3D', name='coords') def beforeAddingToNetwork(self, net): # import vizlib importVizLib(net) class DistanceToPoint(NetworkNode): """ inputs coords and a point, returns the distances of the coords to this point""" def __init__(self, name='DistanceToPoint', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) code = """def doit(self, coords, point): if len(coords) and len(coords): diff = Numeric.array(coords) - Numeric.array(point) diff = diff*diff dist = Numeric.sqrt( Numeric.add.reduce(diff, 1) ) self.outputData(dist=dist)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='coordinates3D', name='coords') ip.append(datatype='None', required=False, name='point', defaultValue=(0,0,0) ) op = self.outputPortsDescr op.append(datatype='None', name='dist') def beforeAddingToNetwork(self, net): # import vizlib importVizLib(net) class SymScaleNE(NetworkNode): """Apply a scale factor to inputs matrices (not required). Outputs scaled matrices. The scaling factor can be applied to x, y and or z, using the checkbutton widgets bound to the node.""" def __init__(self, name='Scale', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = SymScale() code = """def doit(self, matrices, scaleFactor, scaleX, scaleY, scaleZ): if scaleFactor is None: return if not matrices: matrices = None selection = [scaleX, scaleY, scaleZ] result = self.operator(matrices, scaleFactor, selection=selection) self.outputData(outMatrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='instancemat(0)', required=False, name='matrices') ip.append(datatype='float', required=False, name='scaleFactor') ip.append(datatype='int', name='scaleX', defaultValue=1) ip.append(datatype='int', name='scaleY', defaultValue=1) ip.append(datatype='int', name='scaleZ', defaultValue=1) op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='outMatrices') self.widgetDescr['scaleX'] = { 'class':'NECheckButton', 'master':'node', 'labelGridCfg':{'sticky':'w', 'columnspan':2}, 'widgetGridCfg':{'sticky':'w'}, 'labelCfg':{'text':'Scale X'}, 'initialValue':1, } self.widgetDescr['scaleY'] = { 'class':'NECheckButton', 'master':'node', 'labelGridCfg':{'sticky':'w', 'columnspan':2}, 'widgetGridCfg':{'sticky':'w'}, 'labelCfg':{'text':'Scale Y'}, 'initialValue':1, } self.widgetDescr['scaleZ'] = { 'class':'NECheckButton', 'master':'node', 'labelGridCfg':{'sticky':'w', 'columnspan':2}, 'widgetGridCfg':{'sticky':'w'}, 'labelCfg':{'text':'Scale Z'}, 'initialValue':1, } class Dist2Points(NetworkNode): """Computes the distance between two (x,y,z) points""" def __init__(self, name='Dist2Points', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = DistanceBetweenTwoPoints() ip = self.inputPortsDescr ip.append(datatype='list', name='point1') ip.append(datatype='list', name='point2') op = self.outputPortsDescr op.append(datatype='float', name='distance') code = """def doit(self, point1, point2): if point1 and point2: result = self.operator(point1, point2) self.outputData(distance=result)\n""" if code: self.setFunction(code) class PDBToMatrix(NetworkNode): """ inputs PDB file, parses MTRIXn records and returns a list of (4x4) matrices. MTRIXn is the default PDB standard, however not everybody seems to follow the standard, thus an optional keyword can be passed that describes the matrix records in this non-standard PDB file.""" def __init__(self, name='PDBtoMatrix', **kw): kw['name']=name apply( NetworkNode.__init__, (self,), kw) self.operator = PDBtoMatrix() code = """def doit(self, mol, keyword): if mol: if keyword is None or keyword == '' or keyword == []: keyword = 'MTRIX' result = self.operator.getMatrices(mol,keyword) if result: self.outputData(matrices=result)\n""" if code: self.setFunction(code) ip = self.inputPortsDescr ip.append(datatype='MoleculeSet', name='molecule') ip.append(datatype='string', required=False, name='keyword') op = self.outputPortsDescr op.append(datatype='instancemat(0)', name='matrices') def beforeAddingToNetwork(self, net): # import molkitlib importMolKitLib(net) ## saving node icos1 ## from NetworkEditor.macros import MacroNode class Icos1(MacroNode): def __init__(self, constrkw={}, name='Icosahedral1', **kw): kw['name'] = name apply( MacroNode.__init__, (self,), kw) def beforeAddingToNetwork(self, net): MacroNode.beforeAddingToNetwork(self, net) ## loading libraries ## from symserv.VisionInterface.SymservNodes import symlib net.editor.addLibraryInstance( symlib,"symserv.VisionInterface.SymservNodes", "symlib") def afterAddingToNetwork(self): from NetworkEditor.macros import MacroNode MacroNode.afterAddingToNetwork(self) ## loading libraries ## from symserv.VisionInterface.SymservNodes import symlib ## building macro network ## node0 = self node2 = node0.macroNetwork.opNode node2.move(193, 356) from symserv.VisionInterface.SymservNodes import Sym5FoldNE node3 = Sym5FoldNE(constrkw = {}, name='5-fold', library=symlib) node0.macroNetwork.addNode(node3,220,76) node3.inputPorts[1].widget.set( [0.0, 0.52549288072191591, 0.85079799735929229],0) node3.inputPorts[2].widget.set([0.0, 0, 0],0) from symserv.VisionInterface.SymservNodes import Sym3FoldNE node4 = Sym3FoldNE(constrkw = {}, name='3-fold', library=symlib) node0.macroNetwork.addNode(node4,221,142) node4.inputPorts[1].widget.set( [0.57735026918962584, 0.57735026918962584, 0.57735026918962584],0) node4.inputPorts[2].widget.set([0.0, 0, 0],0) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node5 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node5,115,217) node5.inputPorts[1].widget.set([1.0, 0.0, 0.0],0) node5.inputPorts[2].widget.set([0.0, 0, 0],0) node5.inputPorts[3].widget.set(1,0) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node6 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node6,244,218) node6.inputPorts[1].widget.set([0.0, 0.0, 1.0],0) node6.inputPorts[2].widget.set([0.0, 0, 0],0) node6.inputPorts[3].widget.set(0,0) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node7 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node7,381,218) node7.inputPorts[1].widget.set([0.0, 1.0, 0.0],0) node7.inputPorts[2].widget.set([0.0, 0, 0],0) node7.inputPorts[3].widget.set(0,0) from symserv.VisionInterface.SymservNodes import SymMergeNE node8 = SymMergeNE(constrkw = {}, name='Merge', library=symlib) node0.macroNetwork.addNode(node8,233,288) ## saving connections for network Icosahedral1 ## if node4 is not None and node5 is not None: node0.macroNetwork.connectNodes( node4, node5, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node4 is not None and node6 is not None: node0.macroNetwork.connectNodes( node4, node6, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node4 is not None and node7 is not None: node0.macroNetwork.connectNodes( node4, node7, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node3 is not None and node4 is not None: node0.macroNetwork.connectNodes( node3, node4, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node5 is not None and node8 is not None: node0.macroNetwork.connectNodes( node5, node8, "outMatrices", "matrices", blocking=True, doNotSchedule=True) node2 = node0.macroNetwork.opNode if node8 is not None and node2 is not None: node0.macroNetwork.connectNodes( node8, node2, "outMatrices", "new", blocking=True, doNotSchedule=True) if node6 is not None and node8 is not None: node0.macroNetwork.connectNodes( node6, node8, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node7 is not None and node8 is not None: node0.macroNetwork.connectNodes( node7, node8, "outMatrices", "matrices", blocking=True, doNotSchedule=True) ## modifying MacroOutputNode dynamic ports node2.inputPorts[1].configure(singleConnection=True) node0.shrink() ## reset modifications ## node0.resetTags() node0.buildOriginalList() ## saving node icosCage ## from traceback import print_exc from NetworkEditor.macros import MacroNode class IcosCage(MacroNode): def __init__(self, constrkw={}, name='IcosCage', **kw): kw['name'] = name apply( MacroNode.__init__, (self,), kw) def beforeAddingToNetwork(self, net): MacroNode.beforeAddingToNetwork(self, net) ## loading libraries ## from symserv.VisionInterface.SymservNodes import symlib net.editor.addLibraryInstance( symlib,"symserv.VisionInterface.SymservNodes", "symlib") from Vision.StandardNodes import stdlib net.editor.addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib") # also, load vizlib importVizLib(net) def afterAddingToNetwork(self): from NetworkEditor.macros import MacroNode MacroNode.afterAddingToNetwork(self) ## loading libraries ## from symserv.VisionInterface.SymservNodes import symlib from Vision.StandardNodes import stdlib ## building macro network ## node0 = self node1 = node0.macroNetwork.ipNode node1.move(176, 14) node2 = node0.macroNetwork.opNode node2.move(197, 334) from symserv.VisionInterface.SymservNodes import Sym3FoldNE node3 = Sym3FoldNE(constrkw = {}, name='3-fold', library=symlib) node0.macroNetwork.addNode(node3,347,40) node3.inputPorts[1].widget.set( [0.57735026918962584, 0.57735026918962584, 0.57735026918962584],0) node3.inputPorts[2].widget.set([0.0, 0, 0],0) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node4 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node4,270,105) node4.inputPorts[1].widget.set([1.0, 0.0, 0.0],0) node4.inputPorts[2].widget.set([0.0, 0, 0],0) node4.inputPorts[3].widget.set(1) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node5 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node5,347,105) node5.inputPorts[1].widget.set([0.0, 0.0, 1.0],0) node5.inputPorts[2].widget.set([0.0, 0, 0],0) node5.inputPorts[3].widget.set(0) from symserv.VisionInterface.SymservNodes import Sym2FoldNE node6 = Sym2FoldNE(constrkw = {}, name='2-fold', library=symlib) node0.macroNetwork.addNode(node6,427,105) node6.inputPorts[1].widget.set([0.0, 1.0, 0.0],0) node6.inputPorts[2].widget.set([0.0, 0, 0],0) node6.inputPorts[3].widget.set(0) from symserv.VisionInterface.SymservNodes import SymMergeNE node7 = SymMergeNE(constrkw = {}, name='Merge', library=symlib) node0.macroNetwork.addNode(node7,347,173) from symserv.VisionInterface.SymservNodes import ApplyTransfToCoordsNE node8 = ApplyTransfToCoordsNE( constrkw = {}, name='Apply Transf to Coords', library=symlib) node0.macroNetwork.addNode(node8,146,232) from Vision.StandardNodes import Eval node9 = Eval(constrkw = {}, name='[0.0, 0.525, 0....', library=stdlib) node0.macroNetwork.addNode(node9,14,36) node9.inputPorts[0].widget.set("[0.0, 0.525, 0.851]",0) from Vision.StandardNodes import Operator2 node10 = Operator2(constrkw = {}, name='mul', library=stdlib) node0.macroNetwork.addNode(node10,103,113) apply(node10.inputPorts[1].configure, (), {'datatype': 'float'}) apply(node10.outputPorts[0].configure, (), {'datatype': 'list'}) node10.inputPorts[2].widget.set("mul",0) node10.inputPorts[3].widget.set(1,0) from Vision.StandardNodes import Eval node11 = Eval(constrkw = {}, name='[in1]', library=stdlib) node0.macroNetwork.addNode(node11,103,174) apply(node11.inputPorts[1].configure, (), {'datatype': 'list'}) node11.inputPorts[0].widget.set("[in1]",0) from NetworkEditor.items import NetworkNode from Vision.StandardNodes import Generic node12 = Generic(constrkw = {}, name='faces', library=stdlib) node0.macroNetwork.addNode(node12,431,185) apply(node12.addOutputPort, (), {'datatype': 'faceIndices', 'name': 'indices'}) code = """def doit(self): self.outputData(indices=[ [10, 3, 8], [10, 8, 7], [10, 7, 11], [10, 11,9], [10, 9, 3], [1, 4, 2], [1, 2, 0], [1, 0, 6], [1, 6, 5], [1, 5, 4], [3, 5, 8], [8, 5, 6], [8, 6, 7], [7, 6, 0], [7, 0, 11], [11, 0, 2], [11, 2, 9], [9, 2, 4], [9, 4, 3], [3, 4, 5] ]) """ node12.configure(function=code) node13 = Generic(constrkw = {}, name='edges', library=stdlib) node0.macroNetwork.addNode(node13,506,214) apply(node13.addOutputPort, (), {'datatype': 'indice2(0)', 'name': 'indices'}) code = """def doit(self): self.outputData(indices=[ [0, 1], [1, 2], [0, 2], [0, 6], [6, 1], [0, 7], [7, 6], [0, 11], [2, 11], [9, 4], [9, 3], [3, 4], [4, 5], [3, 5], [9, 10], [3, 10], [3, 8], [5, 8], [8, 10], [10, 7], [8, 7], [10, 11], [7, 11], [11, 9], [9, 2], [2, 4], [4, 1], [1, 5], [5, 6], [6, 8] ]) """ node13.configure(function=code) ## saving connections for network IcosCage ## if node3 is not None and node4 is not None: node0.macroNetwork.connectNodes( node3, node4, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node3 is not None and node5 is not None: node0.macroNetwork.connectNodes( node3, node5, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node3 is not None and node6 is not None: node0.macroNetwork.connectNodes( node3, node6, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node4 is not None and node7 is not None: node0.macroNetwork.connectNodes( node4, node7, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node5 is not None and node7 is not None: node0.macroNetwork.connectNodes( node5, node7, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node6 is not None and node7 is not None: node0.macroNetwork.connectNodes( node6, node7, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node9 is not None and node10 is not None: node0.macroNetwork.connectNodes( node9, node10, "result", "data1", blocking=True, doNotSchedule=True) if node10 is not None and node11 is not None: node0.macroNetwork.connectNodes( node10, node11, "result", "in1", blocking=True, doNotSchedule=True) if node11 is not None and node8 is not None: node0.macroNetwork.connectNodes( node11, node8, "result", "coords", blocking=True, doNotSchedule=True) if node1 is not None and node10 is not None: node0.macroNetwork.connectNodes( node1, node10, "new", "data2", blocking=True, doNotSchedule=True) if node8 is not None and node2 is not None: node0.macroNetwork.connectNodes( node8, node2, "coords", "new", blocking=True, doNotSchedule=True) if node7 is not None and node8 is not None: node0.macroNetwork.connectNodes( node7, node8, "outMatrices", "matrices", blocking=True, doNotSchedule=True) if node12 is not None and node2 is not None: node0.macroNetwork.connectNodes( node12, node2, "indices", "new", blocking=True, doNotSchedule=True) if node13 is not None and node2 is not None: node0.macroNetwork.connectNodes( node13, node2, "indices", "new", blocking=True, doNotSchedule=True) ## modifying MacroOutputNode dynamic ports node2.inputPorts[1].configure(singleConnection=True) node2.inputPorts[2].configure(singleConnection=True) node2.inputPorts[3].configure(singleConnection=True) node0.shrink() ## reset modifications ## node0.resetTags() node0.buildOriginalList() from Vision.VPE import NodeLibrary symlib = NodeLibrary('SymServer', 'cyan') symlib.addNode(SymHelixNE, 'Helix', 'Symmetry') symlib.addNode(SymSuperHelixNE, 'SuperHelix', 'Symmetry') symlib.addNode(SymRotNE, 'Rotate', 'Transformation') symlib.addNode(SymOrientNE, 'Orient', 'Transformation') symlib.addNode(SymTransNE, 'Translate', 'Transformation') symlib.addNode(SymTransXYZNE, 'Transl. XYZ', 'Transformation') symlib.addNode(SymScaleNE, 'Scale', 'Transformation') symlib.addNode(Identity, 'Identity', 'Transformation') symlib.addNode(AlignVectToVect, 'Vect2Vect', 'Transformation') symlib.addNode(SymTransposeNE, 'Transpose', 'Transformation') symlib.addNode(SymInverseNE, 'Inverse', 'Transformation') symlib.addNode(PerurbVectorNE, 'PerurbVector', 'Transformations') symlib.addNode(SymMultiplyNE, 'Multiply', 'Mapper') symlib.addNode(SymMergeNE, 'Merge', 'Mapper') symlib.addNode(SymNFoldNE, 'N-fold', 'Symmetry') symlib.addNode(Sym2FoldNE, '2-fold', 'Symmetry') symlib.addNode(Sym3FoldNE, '3-fold', 'Symmetry') symlib.addNode(Sym4FoldNE, '4-fold', 'Symmetry') symlib.addNode(Sym5FoldNE, '5-fold', 'Symmetry') symlib.addNode(Sym6FoldNE, '6-fold', 'Symmetry') symlib.addNode(SymSplitNE, 'Split', 'Filter') symlib.addNode(CoMassNE, 'Center of Mass', 'Mapper') symlib.addNode(ApplyTransfToCoordsNE,'Apply Transf to Coords','Mapper') symlib.addNode(DistanceToPoint,'DistanceToPoint','Mapper') symlib.addNode(Dist2Points,'Dist2Points','Mapper') symlib.addNode(PDBToMatrix,'PDBtoMatrix','Mapper') symlib.addNode(Icos1,'Icosahedral1','Macro') symlib.addNode(IcosCage,'IcosCage','Macro') symlib.addNode(SaveToFile,'Save','I/O') symlib.addNode(ReadFromFile,'Read','I/O') symlib.addWidget(NEXYZVectGUI) try: UserLibBuild.addTypes(symlib, 'MolKit.VisionInterface.MolKitTypes') except Exception, e: print "unable to addTypes from MolKit %s\n" % e mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/regression/0000755000175000017500000000000012146213446025724 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/regression/testAll.py0000644000175000017500000000064607625536037027726 0ustar debiandebianimport sys from mglutil.regression import testplus import test_symnodes harness = testplus.TestHarness( "testAll_symserv_ViPEr", funs = [], dependents = [test_symnodes.harness, ], ) if __name__ == '__main__': testplus.chdir() print harness sys.exit( len( harness)) mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/regression/test_symnodes.py0000644000175000017500000000751510055461162031203 0ustar debiandebian######################################################################### # # Date: Jun 2002 Authors: Daniel Stoffler # # stoffler@scripps.edu # sanner@scripps.edu # # Copyright: Daniel Stoffler, and TSRI # ######################################################################### import sys, string from mglutil.regression import testplus from Vision.VPE import VisualProgramingEnvironment from NetworkEditor.simpleNE import NetworkNode from time import sleep from symserv.VisionInterface.SymservNodes import SymTransNE, SymRotNE, SymMergeNE ed = None withThreads = 1 # default is: multi-threading on # allow for additional user input if len(sys.argv): for myArg in sys.argv[1:]: if myArg[:11] == 'withThreads': withThreads = int(string.strip(myArg)[-1]) def pause(sleepTime=0.2): ed.master.update() sleep(sleepTime) def startEditor(): global ed ed = VisualProgramingEnvironment(name='Vision') ed.root.update_idletasks() ed.configure(withThreads=withThreads) def test_loadSymlib(): from symserv.VisionInterface.SymservNodes import symlib ed.addLibrary(symlib) def quitEditor(): ed.master.after(1000, ed.exit_cb ) def test_allSymNodes(): # test the symserv nodes libs = ed.libraries posx = 150 posy = 150 for lib in libs.keys(): ed.ModulePages.selectpage(lib) ed.root.update_idletasks() for cat in libs[lib].libraryDescr.keys(): for node in libs[lib].libraryDescr[cat]['nodes']: klass = node.nodeClass kw = node.kw args = node.args netNode = apply( klass, args, kw ) print 'testing: '+node.name # begin node test #add node to canvas ed.currentNetwork.addNode(netNode,posx,posy) # show widget in node if available: widgetsInNode = netNode.getWidgetsForMaster('Node') if len(widgetsInNode.items()) is not None: for port,widget in widgetsInNode.items(): netNode.createOneWidget(port) ed.root.update_idletasks() # and then hide it for port,widget in widgetsInNode.items(): netNode.hideInNodeWidget(port.widget) ed.root.update_idletasks() # show widgets in param panel if available: widgetsInNode = netNode.getWidgetsForMaster('ParamPanel') if len(widgetsInPanel.items()): netNode.paramPanel.show() ed.root.update_idletasks() #and then hide it netNode.paramPanel.hide() ed.root.update_idletasks() # and now delete the node ed.currentNetwork.deleteNodes([netNode]) ed.root.update_idletasks() print 'passed: '+node.name # end node test def test_SymTrans(): global ed nodeT = SymTransNE() ed.currentNetwork.addNode(nodeT,100,100) pause() ed.currentNetwork.deleteNodes([nodeT]) pause() def test_SymRot(): global ed nodeR = SymRotNE() ed.currentNetwork.addNode(nodeR,100,100) pause() ed.currentNetwork.deleteNodes([nodeR]) pause() def test_SymMerge(): global ed nodeM = SymMergeNE() ed.currentNetwork.addNode(nodeM,100,100) pause() ed.currentNetwork.deleteNodes([nodeM]) pause() harness = testplus.TestHarness( __name__, connect = startEditor, funs = testplus.testcollect( globals()), disconnect = quitEditor ) if __name__ == '__main__': print harness sys.exit( len( harness)) mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/Tests/0000755000175000017500000000000012146213446024646 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/Tests/__init__.py0000644000175000017500000000000007723744772026765 0ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/Tests/test_symlib.py0000644000175000017500000001150011225224265027551 0ustar debiandebian######################################################################### # # Date: Aug 2003 Authors: Daniel Stoffler, Michel Sanner # # stoffler@scripps.edu # sanner@scripps.edu # # Copyright: Daniel Stoffler, Michel Sanner, and TSRI # ######################################################################### import sys ed = None categories = ['Filter', 'Mapper', 'Symmetry', 'Transformation', 'Macro'] def setUp(): global ed from Vision.VPE import VisualProgramingEnvironment ed = VisualProgramingEnvironment(name='Vision', withShell=0,) ed.root.update_idletasks() ed.configure(withThreads=0) def tearDown(): ed.exit_cb() import gc gc.collect() ########################## ## Helper methods ########################## def pause(sleepTime=0.4): from time import sleep ed.master.update() sleep(sleepTime) def categoryTest(cat): from symserv.VisionInterface.SymservNodes import symlib ed.addLibraryInstance(symlib, 'ymserv.VisionInterface.SymservNodes', 'symlib') ed.root.update_idletasks() pause() # test the molkit nodes lib = 'SymServer' libs = ed.libraries posx = 150 posy = 150 #ed.ModulePages.selectpage(lib) ed.root.update_idletasks() for node in libs[lib].libraryDescr[cat]['nodes']: klass = node.nodeClass kw = node.kw args = node.args netNode = apply( klass, args, kw ) print 'testing: '+node.name # begin node test #add node to canvas ed.currentNetwork.addNode(netNode,posx,posy) # show widget in node if available: widgetsInNode = netNode.getWidgetsForMaster('Node') if len( widgetsInNode.items() ): if not netNode.isExpanded(): netNode.toggleNodeExpand_cb() ed.root.update_idletasks() # and then hide it netNode.toggleNodeExpand_cb() ed.root.update_idletasks() # show widgets in param panel if available: widgetsInPanel = netNode.getWidgetsForMaster('ParamPanel') if len(widgetsInPanel.items()): netNode.paramPanel.show() ed.root.update_idletasks() #and then hide it netNode.paramPanel.hide() ed.root.update_idletasks() # and now delete the node ed.currentNetwork.deleteNodes([netNode]) ed.root.update_idletasks() print 'passed: '+node.name # end node test ########################## ## Tests ########################## def test_01_loadSymLib(): from symserv.VisionInterface.SymservNodes import symlib ed.addLibraryInstance(symlib, 'ymserv.VisionInterface.SymservNodes', 'symlib') ed.root.update_idletasks() pause() # Split testing of the nodes in different tests (by category). def test_02_FilterCategory(): categoryTest("Filter") def test_03_MapperCategory(): categoryTest("Mapper") def test_04_SymmetriesCategory(): categoryTest("Symmetry") def test_05_TransformationsCategory(): categoryTest("Transformation") def test_06_MacrosCategory(): categoryTest("Macro") def old_test_02_allSymlibNodes(): from symserv.VisionInterface.SymservNodes import symlib ed.addLibraryInstance(symlib, 'ymserv.VisionInterface.SymservNodes', 'symlib') ed.root.update_idletasks() pause() # test the molkit nodes lib = 'SymServer' libs = ed.libraries posx = 150 posy = 150 #ed.ModulePages.selectpage(lib) ed.root.update_idletasks() for cat in libs[lib].libraryDescr.keys(): print "category :", cat for node in libs[lib].libraryDescr[cat]['nodes']: klass = node.nodeClass kw = node.kw args = node.args netNode = apply( klass, args, kw ) print 'testing: '+node.name # begin node test #add node to canvas ed.currentNetwork.addNode(netNode,posx,posy) # show widget in node if available: widgetsInNode = netNode.getWidgetsForMaster('Node') if len( widgetsInNode.items() ): if not netNode.isExpanded(): netNode.toggleNodeExpand_cb() ed.root.update_idletasks() # and then hide it netNode.toggleNodeExpand_cb() ed.root.update_idletasks() # show widgets in param panel if available: widgetsInPanel = netNode.getWidgetsForMaster('ParamPanel') if len(widgetsInPanel.items()): netNode.paramPanel.show() ed.root.update_idletasks() #and then hide it netNode.paramPanel.hide() ed.root.update_idletasks() # and now delete the node ed.currentNetwork.deleteNodes([netNode]) ed.root.update_idletasks() print 'passed: '+node.name # end node test mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/VisionInterface/__init__.py0000644000175000017500000000000007517111763025650 0ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/spaceGroups.py0000644000175000017500000021347111100445654023326 0ustar debiandebian# $Header: /opt/cvs/python/packages/share1.5/symserv/spaceGroups.py,v 1.1 2008/10/24 22:26:52 sargis Exp $ # # $Id: spaceGroups.py,v 1.1 2008/10/24 22:26:52 sargis Exp $ # spaceGroups = { 'P -1': [ ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], #_symmetry_equiv_pos_as_xyz # 'x, y, z' # '-x, -y, -z' 'P 1': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 21': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.000000) ), ], 'C 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ], 'P 2 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 2 2 21': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 21 21 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ], 'P 21 21 21': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ], #_symmetry_equiv_pos_as_xyz #'x, y, z' #'-x+1/2, -y, z+1/2' #'x+1/2, -y+1/2, -z' #'-x, y+1/2, -z+1/2' 'C 2 2 21': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ], 'C 2 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ], 'F 2 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ], 'I 2 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ], 'I 21 21 21': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.000000) ), ], 'P 4': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 41': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.750000) ), ], 'P 42': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 43': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.250000) ), ], 'I 4': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ], 'I 41': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.750000) ), ], 'P 4 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 4 21 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ], 'P 41 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.750000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.750000) ), ], 'P 41 21 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.250000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.750000) ), ], 'P 42 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 42 21 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ], 'P 43 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.250000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.250000) ), ], 'P 43 21 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.750000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.250000) ), ], 'I 4 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ], 'I 41 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.250000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.750000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.750000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.750000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.750000) ), ], 'P 3': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 31': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ], 'P 32': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ], 'R 3 R': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ], 'R 3': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ], 'P 3 1 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 3 2 1': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 31 1 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ], 'P 31 2 1': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ], 'P 32 1 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ], 'P 32 2 1': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ], 'R 32 R': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ], 'R 3 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.333330, 0.666660, 0.666660) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.666660, 0.333330, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.666660, 0.333330, 0.333330) ), ], 'P 6': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 61': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.833330) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.166660) ), ], 'P 65': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.166660) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.833330) ), ], 'P 62': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ], 'P 64': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ], 'P 63': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 6 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 61 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.833330) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.166660) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.833330) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.166660) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 65 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.166660) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.833330) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.166660) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.833330) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 62 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 64 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.333330) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.666660) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ], 'P 63 2 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (-1.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((1.000000, -1.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (1.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ( ((-1.000000, 1.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.500000) ), ], 'P 4 3 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ], 'F 4 3 2': [ ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.000000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.000000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.000000, 0.500000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.000000, 0.500000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.000000, 0.500000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.000000, 0.500000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, -1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((-1.000000, 0.000000, 0.000000), (0.000000, -1.000000, 0.000000), (0.000000, 0.000000, 1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, -1.000000), (-1.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, -1.000000, 0.000000), (0.000000, 0.000000, -1.000000), (1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000), (0.000000, -1.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 1.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, -1.000000)), (0.500000, 0.500000, 0.000000) ), ( ((0.000000, 0.000000, 1.000000), (0.000000, 1.000000, 0.000000), (-1.000000, 0.000000, 0.000000)), (0.500000, 0.500000, 0.000000) ), ], } # end of spacegroupsdict mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/utils.py0000644000175000017500000000226611256451432022174 0ustar debiandebian######################################################################## # # Date:Sept 2009 Authors: Michel Sanner # # sanner@scripps.edu # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Michel Sanner and TSRI # ######################################################################### def saveInstancesMatsToFile(filename, matrices): """ save a list of instance matrices to a file status = saveInstancesMatsToFile(filename, matrices) status will be 1 if it worked """ f = open(filename, 'w') if not f: return 0 for mat in matrices: for v in mat.flatten(): f.write("%f "%v) f.write("\n") f.close() return 1 import numpy def readInstancesMatsFromFile(filename): """ read a list of instance matrices from a file matrices = readInstancesMatsFromFile(filename) """ f = open(filename) if not f: return None data = f.readlines() f.close() mats = [] for line in data: mats.append( map(float, line.split()) ) mats = numpy.array(mats) mats.shape = (-1,4,4) return mats mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/symOperators.py0000644000175000017500000007144311277360261023550 0ustar debiandebian## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by ######################################################################## # # Date: Nov 2001 Authors: Daniel Stoffler, Michel Sanner # # stoffler@scripps.edu # sanner@scripps.edu # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Daniel Stoffler, Michel Sanner and TSRI # ######################################################################### from mglutil.math.rotax import rotax from mglutil.math.transformation import Transformation import numpy import numpy.oldnumeric as Numeric, math, string class SymNFold: """ vector: list of floats [x, y, z] point: list of floats [x, y, z] symmetry int, >= 1 identity: int, 0 or 1 """ def __init__(self, vector, point, symmetry, identity): self.set(vector, point, symmetry, identity) def getMatrices(self): angle=360.0/self.symmetry m=[] t=Numeric.array(self.point)*-1 if self.identity == 1: mat = Numeric.identity(4).astype('f') m.append(mat) T = Transformation(trans=t) T1 = T.inverse() for i in range(self.symmetry-1): newList=[] newList.extend(list(self.vector)) newList.append(angle) R = Transformation(quaternion=newList) mt = T1 * R * T #newmat = mt.getMatrix() newmat = mt.getDejaVuMatrix() m.append(newmat) angle=angle+360.0/self.symmetry return m def set(self, vector=None, point=None, symmetry=None, identity=None): if vector: assert len(vector)==3 self.vector = Numeric.array(vector).astype('f') if point: assert len(point)==3 self.point = Numeric.array(point).astype('f') if symmetry: assert symmetry >= 1 self.symmetry = symmetry if identity is not None: assert identity in (0,1) self.identity = identity def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymNFold(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices if applyIndex is given it should be a list of 0-based indices of matrices to which this operator's transformation will be applied. """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymTrans: def __init__(self, vector=(1.0, 0.0, 0.0), length=0.0, identity=0): self.vector = vector self.length = length self.identity = identity def getMatrices(self): m=[] mat=Numeric.identity(4).astype('f') if self.length is None or self.length == 0: m.append( Numeric.identity(4).astype('f') ) return m if self.identity == 1: m.append( Numeric.identity(4).astype('f') ) mat[:3, 3] = (self.vector*self.length).astype('f') m.append(mat) return m def set(self, vector=None, identity=None, length=None): if vector: assert len(vector)==3 self.vector = Numeric.array(vector).astype('f') if identity is not None: assert identity in (0,1) self.identity = identity if length is not None: self.length = float(length) def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymTrans(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymTransXYZ: def __init__(self, data, identity): self.set(data, identity) def set(self, data=None, identity=None): if data: assert len(data)==6 self.vector1 = Numeric.array(data[3]).astype('f')*float(data[0]) self.vector2 = Numeric.array(data[4]).astype('f')*float(data[1]) self.vector3 = Numeric.array(data[5]).astype('f')*float(data[2]) if identity is not None: assert identity in (0,1) self.identity = identity def getMatrices(self): m=[] t1=Numeric.array(self.vector1)#*-1 #FIXME: why did we do this? t2=Numeric.array(self.vector2)#*-1 t3=Numeric.array(self.vector3)#*-1 if self.identity == 1: mat = Numeric.identity(4).astype('f') m.append(mat) T1 = Transformation(trans=t1) T2 = Transformation(trans=t2) T3 = Transformation(trans=t3) mt = T1*T2*T3 newmat = mt.getMatrix() m.append(newmat) return m def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymRot(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymRot: def __init__(self, vector, point, angle, identity): self.set(vector, point, angle, identity) def getMatrices(self): m=[] t=Numeric.array(self.point)*-1. if self.identity == 1: mat = Numeric.identity(4).astype('f') m.append(mat) newList=[] newList.extend(list(self.vector)) newList.append(self.angle) T = Transformation(trans=t) R = Transformation(quaternion=newList) mt = T.inverse() * R * T newmat = mt.getMatrix() #TR = Transformation(trans=t, quaternion=newList) #newmat = TR.getMatrix() m.append(newmat) return m def set(self, vector=None, point=None, angle=None, identity=None): if vector: assert len(vector)==3 self.vector = Numeric.array(vector).astype('f') if point: assert len(point)==3 self.point = Numeric.array(point).astype('f') if angle is None: self.angle = 0.0 elif angle is not None: self.angle = angle if identity is not None: assert identity in (0,1) self.identity = identity def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymRot(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymScale: def getMatrices(self, scaleFactor, selection=[1, 1, 1]): mat = Numeric.identity(4).astype('f') # apply scale factor to x, y and/or z if selection[0] not in [0, False]: mat[0][0] = scaleFactor else: mat[0][0] = 1.0 if selection[1] not in [0, False]: mat[1][1] = scaleFactor else: mat[1][1] = 1.0 if selection[2] not in [0, False]: mat[2][2] = scaleFactor else: mat[2][2] = 1.0 return mat def __call__(self, inMatrices, scaleFactor, applyIndex=None, selection=[True,True,True]): """outMatrices <- SymScale(inMatrices, applyIndex=None, selection=[1,1,1]) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices (selection: scale x,y, and/or z) can be 1,True or 0,False) """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices(scaleFactor, selection) out = [] for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(im, ownmat) ) return out class SymHelix: """ Operator to build a stream of transforamtion matrices describing a helical arrangment. arguments: vector: the 3-D vector defining the oriention of the helical axis point: a 3-D point defining the location in space of the helical axis angle: angular value in degrees between 2 consecutive copies hrise: displacement along the helical axis between 2 consecutive copies copies: number of transformations """ def __init__(self, vector, point, angle, hrise, copies): self.copies = 1 self.hrise = 0 self.angle = 0 self.point = (0.,0.,0.) self.vector = (0.,1.,0.) self.set(vector=vector, point=point, angle=angle, hrise=hrise, copies=copies) def normalize(self, v): nv = float(math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2])) return (v[0]/nv, v[1]/nv, v[2]/nv) def set(self, vector=None, point=None, angle=None, hrise=None, copies=None): if vector is not None: assert len(vector)==3 self.vector = self.normalize(vector) if point is not None: assert len(point)==3 self.point = point if angle is not None: self.angle = angle*math.pi/180. if hrise is not None: self.hrise = hrise if copies is not None: assert copies >= 1 self.copies=copies def getMatrices(self): matrices = [] r = self.hrise v = self.vector p = self.point rv = (r*v[0], r*v[1], r*v[2]) ## does not work .. some weird problem with the angle (MS) # build one increment of transformation ## R = Transformation( ## trans=[rv[0], rv[1], rv[2]], ## quaternion=[v[0], v[1], v[2], self.angle*180/math.pi]) ## T = Transformation(trans=self.point) ## transform1 = T * R * T.inverse() ## transform = T * R * T.inverse() ## matrices.append( transform.getMatrix() ) ## for i in range(self.copies-1): ## transform = transform*transform1 ## matrices.append( transform.getMatrix() ) # build rotation and translation matrix about helical axis going # rot matrix C style R = rotax( p, [p[0]+v[0], p[1]+v[1], p[2]+v[2]], self.angle, False) riseMat = Numeric.identity(4).astype('f') riseMat[:3, 3] = rv # add the rise transform = Numeric.dot(riseMat, R) N = Numeric matrices.append( N.identity(4).astype('f')) for i in range(1,self.copies): mat = matrices[i-1] mat = Numeric.dot(mat, transform) matrices.append(mat) return matrices def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymHelix(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymSuperHelix(SymHelix): """ Build a stream of transforamtion matrices describing a super-helix helix 1 is the overall helical arangment helix 2 is the loca helical arrangement arguments: vector: the 3-D vector defining the oriention of the helical axis point: a 3-D point defining the location in space of the helical axis angle: angular value in degrees between 2 consecutive copies hrise: displacement along the helical axis between 2 consecutive copies vector2: the 3-D vector defining the oriention of the helical axis point2: a 3-D point defining the location in space of the helical axis angle2: angular value in degrees between 2 consecutive copies hrise2: displacement along the helical axis between 2 consecutive copies copies: number of transformations """ def __init__(self, vector, point, angle, hrise, vector2, point2, angle2, hrise2, copies): SymHelix.__init__(self, vector, point, angle, hrise, copies) self.hrise2 = 0 self.angle2 = 0 self.point2 = (0.,0.,0.) self.vector2 = (0.,1.,0.) self.set(vector2=vector2, point2=point2, angle2=angle2, hrise2=hrise2) def set(self, vector=None, point=None, angle=None, hrise=None, vector2=None, point2=None, angle2=None, hrise2=None, copies=None): SymHelix.set(self, vector=vector, point=point, angle=angle, hrise=hrise, copies=copies) if vector2 is not None: print vector2 assert len(vector2)==3 self.vector2 = self.normalize(vector2) if point2 is not None: assert len(point2)==3 self.point2 = point2 if angle2 is not None: self.angle2 = angle2*math.pi/180. if hrise2 is not None: self.hrise2 = hrise2 def getMatrices(self): pt1 = self.point v1 = self.vector r1 = self.hrise pt2 = self.point2 v2 = self.vector2 r2 = self.hrise2 nbCopies = self.copies matrices1 = [] # overall helical transfomations matrices2 = [] # local helical transformations rv1 = (r1*v1[0], r1*v1[1], r1*v1[2]) # tanslation vector 1 rv2 = (r2*v2[0], r2*v2[1], r2*v2[2]) # tanslation vector 2 # rotation matrix for helix 1 R = rotax( pt1, [pt1[0]+v1[0], pt1[1]+v1[1], pt1[2]+v1[2]], self.angle, False) # rise transformation for helix 1 riseMat1 = numpy.identity(4).astype('f') riseMat1[:3, 3] = rv1 # add the rise # helical step for helix 1 transform1 = numpy.dot(riseMat1, R) # first transformation is didentity for both helices matrices1.append( numpy.identity(4).astype('f') ) matrices2.append( numpy.identity(4).astype('f') ) ang2 = self.angle2 # angle for helix 2 # loop over number of copies for i in range(1,nbCopies): # take previous transfromation mat = matrices1[i-1] # add 1 helic step for overall helix mat = numpy.dot(mat, transform1) # save this in transformation for overall helix matrices1.append(mat) # move the point defining local helix along first helical axis p2t = (pt2[0]+(i*rv1[0]), pt2[1]+(i*rv1[1]), pt2[2]+(i*rv1[2])) # build local helix rotation R = rotax( p2t, [p2t[0]+v2[0], p2t[1]+v2[1], p2t[2]+v2[2]], ang2, False) # build local helix raise riseMat2 = numpy.identity(4).astype('f') riseMat2[:3, 3] = rv2 # add the rise # build helical step for local helix transform2 = numpy.dot(riseMat2, R) mat = matrices2[i-1] # apply step to previous helical step mat = numpy.dot(mat, transform2) matrices2.append(mat) # combine the overall helix wioth the local helix results = [] results.append(numpy.identity(4).astype('f') ) for i in range(1,nbCopies): results.append( numpy.dot(matrices2[i], matrices1[i]) ) return results def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymSuperHelix(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class SymMerge: def __init__(self): pass def getMatrices(self): pass def set(self): pass def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymMerge(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] return inMatrices class SymMultiply: """ SymMultiply multiplies incoming matrices and ouputs them. - 1 parent is multiplied with itself - 2 parents: two valid options: either one of the parents has lenght 1 (1 matrix) which is then multiplied to all other matrices of the second parent or both parents have the same amount of matrices. """ def __init__(self): pass def getMatrices(self, matA, matB): matInA, matInB = self.set(matA, matB) #assert that matrices have either size 1, or equal size assert len(matInA) == 1 or len(matInB) == 1 or \ len(matInA) == len(matInB) matrixOut = [] #now the actual multiplication if len(matInA) == 1: for i in range(len(matInB)): #loop over node's incoming matrices matrixOut.append(Numeric.dot(matInA[0], matInB[i])) elif len(matInB) == 1: for i in range(len(matInA)): #loop over node's incoming matrices matrixOut.append(Numeric.dot(matInA[i], matInB[0])) else: for i in range(len(matInA)): #loop over node's incoming matrices matrixOut.append(Numeric.dot(matInA[i], matInB[i])) return matrixOut def set(self, inA=None, inB=None): if inA is None and inB is not None: matInA = matInB = inB elif inA is not None and inB is None: matInA = matInB = inA elif inA is not None and inB is not None: matInA = inA matInB = inB elif inA is None and inB is None: matInA = matInB = Numeric.identity(4).astype('f') return matInA, matInB def __call__(self, matA=None, matB=None): """outMatrices <- SymMerge(matA, matB) matA: list of 4x4 matrices matB: list of 4x4 matrices outMatrices: list of 4x4 matrices """ out = self.getMatrices(matA, matB) return out class SymSplit: """unselected matrices of the incomming stream are sent to output port 0, selected matrices are sent to additional output ports which get created on selection. selection is done by specifying matrices comma separated indices in the incomming stream. Ranges can be specified using the ':' or '-' character. additional ports are created by using the ';' character. """ def __init__(self, matrices, chars): self.set(matrices, chars) def set(self, matrices=None, chars=None): self.inMatrices = matrices self.indices = self.processString(chars) def processString(self, entry): split1=[] split2=[] l=[] ll=[] newList=[] split1=string.split(entry,';') i=0 for i in range(len(split1)): l=string.split(split1[i],',') for item in l: try: val=int(item) ll.append(val) except: for c in item: if c == '-' or c == ':': s=string.split(item,c) newList=range(int(s[0]),int(s[1])+1) for i in range(len(newList)): ll.append(newList[i]) split2.append(ll) ll=[] return split2 def getMatrices(self): outMatrices=[] indicesComp = range(len(self.inMatrices)) if self.indices[0] == []: self.indices[0] = indicesComp fullList = [] else: fullList = Numeric.concatenate(self.indices) map( indicesComp.remove, fullList ) self.indices.insert(0,indicesComp) for i in range(len(self.indices)): outMatrices.append(Numeric.take(self.inMatrices, self.indices[i])) return outMatrices def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymSplit(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: outMatrices = [Numeric.identity(4).astype('f')] else: outMatrices = self.getMatrices() return outMatrices class CenterOfMass: """ imputs xyz coords, outputs center of gravity """ def __init__(self, coords): self.set(coords) def set(self, coords=None): self.coords = coords def compute(self): if self.coords is None: return [0., 0., 0.] else: self.coords=list(Numeric.sum(self.coords)/len(self.coords)) return self.coords def __call__(self): return self.compute() class SymOrient: """ rotation around center of gravity """ def __init__(self, vector, angle, center, identity): self.set(vector, angle, center, identity) def getMatrices(self): m=[] newList=[] mat = Numeric.identity(4).astype('f') if self.identity == 1: m.append(mat) newList.extend(list(self.vector)) newList.append(self.angle) t=Numeric.array(self.center)*-1 T = Transformation(trans=t) R = Transformation(quaternion=newList) mt = T.inverse() * R * T newmat = mt.getMatrix() m.append(newmat) return m def set(self, vector=None, angle=None, center=None, identity=None): if vector: assert len(vector)==3 self.vector = vector if angle is None: self.angle = 0.0 elif angle is not None: self.angle=angle if center is None: center=[0.,0,0] self.center=center if identity is not None: assert identity in (0,1) self.identity = identity def __call__(self, inMatrices, applyIndex=None): """outMatrices <- SymOrient(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert len(matrices.shape)==3 assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 ownmat = self.getMatrices() out = [] for m in ownmat: # loop over this node's own transformation matrices for im in matrices: #loop over node's incoming matrices out.append( Numeric.dot(m, im) ) return out class ApplyTransfToCoords: """ applies matrices to coords and outputs transformed coords """ def __init__(self, coords, matrices): pass def getMatrices(self): pass def set(self, coords=None, matrices=None): if coords is None: return else: self.coords = Numeric.array(coords).astype('f') if matrices is None: self.matrices = [Numeric.identity(4).astype('f')] else: #assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 self.matrices = matrices def compute(self): newCoords=[] if self.coords is not None: one = Numeric.ones( (self.coords.shape[0], 1), \ self.coords.dtype.char ) c = Numeric.concatenate( (self.coords, one), 1 ) for m in range(len(self.matrices)): newCoords.append(Numeric.dot(c, \ Numeric.transpose(self.matrices[m]))[:, :3]) return Numeric.concatenate(newCoords) def __call__(self): return self.compute() class PDBtoMatrix: """ inputs PDB file, parses MTRIXn records and returns a list of (4x4) matrices. MTRIXn is the default PDB standard, however not everybody seems to follow the standard, thus an optional keyword can be passed that describes the matrix records in this non-standard PDB file.""" def __init__(self): pass def getMatrices(self, mol=None, keyword='MTRIX'): if mol is None: return matrices = [] next = 0 lines = mol.data[0].parser.allLines arr = Numeric.identity(4).astype('f') for l in lines: spl = string.split(l) if spl[0][:-1] != keyword: continue index = int(spl[0][-1:])-1 arr[index][0] = float(spl[2]) arr[index][1] = float(spl[3]) arr[index][2] = float(spl[4]) if index == 2: matrices.append(arr) arr = Numeric.identity(4).astype('f') return matrices class SymTranspose: """ SymTranspose transposes all incomming matrices. """ def __call__(self, inMatrices=None, applyIndex=None): """outMatrices <- SymTranspose(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 out = [] for im in matrices: #loop over node's incoming matrices out.append( Numeric.transpose(im) ) return out class SymInverse: """ SymInverse inverse all incomming matrices. """ def __call__(self, inMatrices=None, applyIndex=None): """outMatrices <- SymInverse(inMatrices, applyIndex=None) inMatrices: list of 4x4 matrices outMatrices: list of 4x4 matrices """ import numpy.oldnumeric.linear_algebra as LinearAlgebra if not inMatrices: inMatrices = [Numeric.identity(4).astype('f')] matrices = Numeric.array(inMatrices) assert matrices.shape[-2] == 4 and matrices.shape[-1] == 4 out = [] for im in matrices: #loop over node's incoming matrices out.append( LinearAlgebra.inverse(im) ) return out class DistanceBetweenTwoPoints: """Compute the distance between two (x,y,z) points""" def __call__(self, point1, point2): """point1, point2 both must be (x,y,z) coordinates""" x1, y1, z1 = point1 x2, y2, z2 = point2 dist = math.sqrt( math.pow((x2-x1),2) + math.pow((y2-y1),2) + \ math.pow((z2-z1),2) ) return dist mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/.packager.py0000644000175000017500000000546207770201137022671 0ustar debiandebian# The .packager.py is used by the DistTools package to get the files to be # included in a distribution. def getFiles(root, what = 'all', plat=None): """ files <- getFiles(root, what='all', plat=None) files -- list of the files to be included in the download arguments: root -- path to the package. This is used by glob to get all the python modules. what -- string that can be 'all' and 'supported' to specified what files to include in the distribution. By default 'all' the files are added. plat -- platform ('linux2', 'irix646', 'sunos5' etc...) """ import os from glob import glob # 1- Specify the list of all the Python module allPyModule = ["*.py", "ViPEr/*.py"] # 2- Specify the list of the non supported Python module. These files # will be removed from the release of the supported python modules. pynotsupported = [] # 3- Specify the documentation files and directories to be included in the # release docFiles = []#["doc"] # 4-Specify the extraFiles to be included in the release. extraFiles = ["CVS", "ViPEr/CVS"] # 5-Specify the testFiles to be included in the release. testFiles = ["ViPEr/Tests/*.py","ViPEr/Tests/CVS" ] ######################################################### ## Where things are done for you . ######################################################### # if some files need to be removed, we need the exact list of the pymodule. if len(pynotsupported): # store the path of the current directory olddir = os.getcwd() os.chdir(root) files = [] # we use glob to get the exact list of files. for p in allPyModule: files = files + glob(p) allPyModule = files files = [] # need to get the list of the files ... no wild card possible. for p in pynotsupported: files = files + glob(p) pynotsupported = files os.chdir(olddir) # Creation of the proper list of files depending on the value of what if what == 'supported' and len(pynotsupported): # need to remove the non supported python files from all the python # files # These are the keys used for to make the releases... supportedFiles = filter(lambda x, l = pynotsupported: not x in l, allPyModule) return supportedFiles + testFiles + extraFiles elif what == 'all' or ( what == 'supported' and not len(pynotsupported)): # Other wise just add the documentation, test and extra files to all # the python modules. allFiles= allPyModule + docFiles + testFiles + extraFiles return allFiles elif what == 'documentation': return docFiles else: return [] mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/LICENSE0000644000175000017500000000436411033235373021465 0ustar debiandebianThis software is copyrighted by Michel F. Sanner (sanner@scripps.edu) and TSRI. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. MGLTOOLS SOFTWARE LICENSE AGREEMENT. 1. Grant Of Limited License; Software Use Restrictions. The programs received by you will be used only for NON COMMERCIAL purposes. This license is issued to you as an individual. For COMMERCIAL use done with the software please contact Michel F. Sanner for details about commercial usage license agreements. For any question regarding license agreements, please contact Michel Sanner: TSRI, Molecular Biology Department, TCP 26, 10550 North Torrey Pines Road, La Jolla, CA 92037 sanner@scripps.edu tel (858) 784-7742 fax (858) 784-2341 2. COMMERCIAL USAGE is defined as revenues generating activities. These include using this software for consulting activities and selling applications built on top of, or using this software. Scientific research in an academic environment and teaching are considered NON COMMERCIAL. 3. Copying Restrictions. You will not sell or otherwise distribute commercially these programs or derivatives to any other party, whether with or without consideration. 4. Ownership of Software. You will not obtain, and will not attempt to obtain copyright coverage thereon without the express purpose written consent of The Scripps Research Institute and Dr. Sanner. 5. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/Tests/0000755000175000017500000000000012146213445021555 5ustar debiandebianmgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/Tests/test_dependencies.py0000644000175000017500000000161411216031312025602 0ustar debiandebian# ################################################################# # Author: Sowjanya Karnati ################################################################# # #Purpose:To update dependencies list # # $Id: test_dependencies.py,v 1.5 2009/06/17 00:03:22 vareille Exp $ from mglutil.TestUtil.Tests.dependenciestest import DependencyTester import unittest,sys, os d = DependencyTester() result_expected =[] class test_dep(unittest.TestCase): def test_dep_1(self): if os.name != 'nt': #sys.platform != 'win32': result = d.rundeptester('symserv') if result !=[]: print "\nThe Following Packages are not present in CRITICAL or NONCRITICAL DEPENDENCIES of symserv :\n %s" %result self.assertEqual(result,result_expected) else: self.assertEqual(result,result_expected) if __name__ == '__main__': unittest.main() mgltools-symserv-1.5.7~rc1~cvs.20130519/symserv/__init__.py0000644000175000017500000000017210676011241022560 0ustar debiandebianCRITICAL_DEPENDENCIES = ['mglutil', 'numpy'] NONCRITICAL_DEPENDENCIES = ['NetworkEditor', 'MolKit', 'DejaVu', 'Vision'] mgltools-symserv-1.5.7~rc1~cvs.20130519/version.py0000644000175000017500000000002011475262374021003 0ustar debiandebianVERSION="1.5.6" mgltools-symserv-1.5.7~rc1~cvs.20130519/MANIFEST.in0000644000175000017500000000073611033236707020507 0ustar debiandebian# This list all other files to be included in the distribution # which are not python modules # include, exclude.... which are not described in the setup.py. include MANIFEST.in # list of the non python module to be included in the distribution include symserv/RELNOTES include symserv/doc.tar.gz # include all the CVS directories include symserv/CVS/* include symserv/VisionInterface/CVS/* include symserv/VisionInterface/Tests/CVS/* include symserv/LICENSE include version.py