t1 = numpy.identity(4) t1[:3,3] = initialConf negt1 = numpy.identity(4) for i in range(len(initialConf)): negt1[i,3] = initialConf[i] * -1 t2 = numpy.identity(4) t2[:3,3] = [tx, ty, tz] rot = numpy.identity(4) r = numpy.array(rotations[ri]) r.shape = (3,3) rot[0:3,0:3] = r self.mat = numpy.dot(t2, numpy.dot(t1, numpy.dot(rot,negt1))) geom = molecule.geomContainer.geoms['master'] geom.SetTransformation(self.mat, transpose=True) self.outputData(score=score, RMSD=rmsd) """ self.setFunction(code) from Vision.VPE import NodeLibrary F2Docklib = NodeLibrary('F2Dock', '#663366') F2Docklib.addNode(RotationFile, 'RotFile', 'Rotations') F2Docklib.addNode(ReadLog, 'ReadLog', 'Input') F2Docklib.addNode(BrowseLog, 'BrowseLog', 'Mapper')
self.outputPortsDescr.append(datatype=None, name='data') code = """def doit(self, function, data, mec): assert callable(function) result = mec.map(function, data) self.outputData(data=result) """ self.setFunction(code) from Vision.VPE import NodeLibrary iplib = NodeLibrary('IPython', 'grey75') iplib.addNode(IPmec, 'MEC', 'Objects') iplib.addNode(IPLocalMEC2, 'MEC2local', 'Objects') iplib.addNode(IPLocalMEC3, 'MEC3local', 'Objects') iplib.addNode(IPLocalMEC4, 'MEC4local', 'Objects') iplib.addNode(IPLocalMEC5, 'MEC5local', 'Objects') iplib.addNode(IPLocalMEC6, 'MEC6local', 'Objects') iplib.addNode(IPLocalMEC7, 'MEC7local', 'Objects') iplib.addNode(IPLocalMEC8, 'MEC8local', 'Objects') iplib.addNode(IPPull, 'Pull', 'Communication') iplib.addNode(IPPush, 'Push', 'Communication') #iplib.addNode(IPPushFunction, 'Push Func', 'Communication') iplib.addNode(IPScatter, 'Scatter', 'Communication') iplib.addNode(IPGather, 'Gather', 'Communication') iplib.addNode(IPmap, 'PMap', 'Mapper') iplib.addNode(IPRunFunction, 'PRunFunc', 'Mapper') iplib.addNode(FractalDemo, 'Fractal Demo', 'Demo')
'text': 'URL' }, } self.inputPortsDescr.append({'name': 'url', 'datatype': 'string'}) code = """def doit(self, url): url = self.getInputPortByName('url').data webbrowser.open(url) """ if code: self.setFunction(code) from Vision.VPE import NodeLibrary wslib = NodeLibrary('Web Services', '#d7fdf9') wslib.addNode(GetWSNode, 'Load WS', 'Generic') wslib.addNode(DownloadNode, 'Download', 'Generic') wslib.addNode(DownloadSaveDirNode, 'DownloadSaveDir', 'Generic') wslib.addNode(DownloadToFileNode, 'DownloadToFile', 'Generic') wslib.addNode(GetMainURLNode, 'GetMainURL', 'Generic') wslib.addNode(GetMainURLFromListNode, 'GetMainURLFromList', 'Generic') wslib.addNode(GetURLFromListNode, 'GetURLFromList', 'Generic') wslib.addNode(IsURLNode, 'IsURL', 'Generic') wslib.addNode(ReplaceURLNode, 'ReplaceURL', 'Generic') wslib.addNode(WebBrowserNode, 'WebBrowser', 'Generic') #addOpalServerAsCategory('http://ws.nbcr.net/opal2') #addOpalServerAsCategory('http://krusty.ucsd.edu:8081/opal2') #addOpalServerAsCategory('http://kryptonite.ucsd.edu/opal2') try: UserLibBuild.addTypes(wslib, 'MolKit.VisionInterface.MolKitTypes')
self.editor.currentNetwork.addNode(node, posX, posY) #node.addOutputPort(name='html', datatype='list') node.CGIFormObj = form node.CGIFormObj.setURL(url) self.outputData(forms=forms)\n""" self.setFunction(code) from Vision.VPE import NodeLibrary weblib = NodeLibrary('Web', '#bb4040') weblib.addNode(ConsurfClientNode, 'Consurf', 'Filter') #weblib.addNode(WebBrowser, 'Web Browser', 'Output') # not supported any longr weblib.addNode(GetCGIForms, 'Get CGI Forms', 'Filter') #weblib.addNode(CGIFormNode, 'CGI Form Node', 'Output') if __name__ == '__main__': print 'Creating client Object' server = ConsurfServer() print 'submitting job' server.setArguments(pdb_ID='2plv', chain='1', ALGORITHM="Likelihood") result = server.run() print 'get temporary result page' resultPage = server.getResultPage(result) print ' wait for completion' resultUrl = server.checkForCompletion(resultPage) print ' COMPLETED'
if obj: self.outputData(molecule=obj) """ self.setFunction(code) def beforeAddingToNetwork(self, net): # loading library molkitlib importMolKitLib(net) from Vision.VPE import NodeLibrary pmvlib = NodeLibrary('Pmv', '#7A7AFF') pmvlib.addNode(PmvChooseCommand, 'Choose Cmd', 'Filter',) pmvlib.addNode(PmvSetCPKRadii, 'Set CPK radii', 'Mapper',) pmvlib.addNode(PmvSetInstanceMatrices, 'Set Instances', 'Mapper',) pmvlib.addNode(PmvRunCommand, 'Run Command', 'Output',) pmvlib.addNode(PmvGetSelection, 'Get Selection', 'Input',) pmvlib.addNode(PmvMoleculeChooser, 'Choose Molecule', 'Input',) if msmsFound==1: pmvlib.addNode(GetMSMSGeom, 'Get MSMS Geom', 'Filter') UserLibBuild.addTypes(pmvlib, 'Pmv.VisionInterface.PmvTypes')
buildCGIWidget(node, form) self.editor.currentNetwork.addNode(node, posX, posY) #node.addOutputPort(name='html', datatype='list') node.CGIFormObj = form node.CGIFormObj.setURL(url) self.outputData(forms=forms)\n""" self.setFunction(code) from Vision.VPE import NodeLibrary weblib = NodeLibrary('Web', '#bb4040') weblib.addNode(ConsurfClientNode, 'Consurf', 'Filter') #weblib.addNode(WebBrowser, 'Web Browser', 'Output') # not supported any longr weblib.addNode(GetCGIForms, 'Get CGI Forms', 'Filter') #weblib.addNode(CGIFormNode, 'CGI Form Node', 'Output') if __name__ == '__main__': print 'Creating client Object' server = ConsurfServer() print 'submitting job' server.setArguments( pdb_ID='2plv', chain='1', ALGORITHM="Likelihood") result = server.run() print 'get temporary result page' resultPage = server.getResultPage(result) print ' wait for completion' resultUrl = server.checkForCompletion(resultPage)
'widgetGridCfg': { 'labelSide': 'left' }, #, 'column': 1, 'row': 1}, 'labelCfg': { 'text': 'MPEG player pgm' }, 'class': 'NEEntryWithFileBrowser' } except ImportError: print 'Failed to import pymedia.video.vcodec' from Vision.VPE import NodeLibrary imagelib = NodeLibrary('Imaging', '#995699') imagelib.addNode(ImageFromArray, 'Image from array', 'Input') imagelib.addNode(ReadImage, 'Read Image', 'Input') imagelib.addNode(GetFrontBuffer, 'Grab Image', 'Input') #imagelib.addNode(GetZBuffer, 'RecordMPEGmovie', 'Input') imagelib.addNode(ShowImage, 'Show Image', 'Output') imagelib.addNode(ImageStat, 'Image Stat', 'Output') imagelib.addNode(SaveImage, 'Save Image', 'Output') try: import pymedia.video.vcodec as vcodec imagelib.addNode(RecordMPEGmovie, 'Record MPEG movie', 'Output') imagelib.addNode(PlayMPEG, 'Play MPEG', 'Output') except ImportError: pass
self.widgetDescr['url'] = {'class':'NEEntry', 'master':'node', 'labelCfg':{'text':'URL'}, } self.inputPortsDescr.append( {'name':'url', 'datatype':'string'} ) code = """def doit(self, url): url = self.getInputPortByName('url').data webbrowser.open(url) """ if code: self.setFunction(code) from Vision.VPE import NodeLibrary wslib = NodeLibrary('Web Services', '#d7fdf9') wslib.addNode(GetWSNode, 'Load WS', 'Generic') wslib.addNode(DownloadNode, 'Download', 'Generic') wslib.addNode(DownloadSaveDirNode, 'DownloadSaveDir', 'Generic') wslib.addNode(DownloadToFileNode, 'DownloadToFile', 'Generic') wslib.addNode(GetMainURLNode, 'GetMainURL', 'Generic') wslib.addNode(GetMainURLFromListNode, 'GetMainURLFromList', 'Generic') wslib.addNode(GetURLFromListNode, 'GetURLFromList', 'Generic') wslib.addNode(IsURLNode, 'IsURL', 'Generic') wslib.addNode(ReplaceURLNode, 'ReplaceURL', 'Generic') wslib.addNode(WebBrowserNode, 'WebBrowser', 'Generic') #addOpalServerAsCategory('http://ws.nbcr.net/opal2') #addOpalServerAsCategory('http://krusty.ucsd.edu:8081/opal2') #addOpalServerAsCategory('http://kryptonite.ucsd.edu/opal2') try: UserLibBuild.addTypes(wslib, 'MolKit.VisionInterface.MolKitTypes')
c[p] = col i = i + 1 self.outputData(out1=c)\n""" if code: self.setFunction(code) self.inputPortsDescr.append({'name': 'in1', 'datatype': 'None'}) self.outputPortsDescr.append({'name': 'out1', 'datatype': 'None'}) class DefaultIndices(NetworkNode): def __init__(self, name='default indices', **kw): apply(NetworkNode.__init__, (self, ), kw) code = """def doit(self, in1): self.outputData(out1=[range(in1[0])])\n""" if code: self.setFunction(code) self.inputPortsDescr.append({'name': 'length', 'datatype': 'int'}) self.outputPortsDescr.append({'name': 'out1', 'datatype': 'None'}) from Vision.VPE import NodeLibrary flexlib = NodeLibrary('Flex', '#AA66AA') flexlib.addNode(DistanceMatrix, 'DM', 'Input') flexlib.addNode(DDM, 'DDM', 'Input') flexlib.addNode(Cluster, 'Cluster', 'Input') flexlib.addNode(ColorCluster, 'Color Cluster', 'Input') flexlib.addNode(DefaultIndices, 'indices', 'Input')
self.outputData(molecule=obj) """ self.setFunction(code) def beforeAddingToNetwork(self, net): # loading library molkitlib importMolKitLib(net) from Vision.VPE import NodeLibrary pmvlib = NodeLibrary('Pmv', '#7A7AFF') pmvlib.addNode( PmvChooseCommand, 'Choose Cmd', 'Filter', ) pmvlib.addNode( PmvSetCPKRadii, 'Set CPK radii', 'Mapper', ) pmvlib.addNode( PmvSetInstanceMatrices, 'Set Instances', 'Mapper', ) pmvlib.addNode(