def afterAddingToNetwork(self):
        masterNet = self.macroNetwork
        from NetworkEditor.macros import MacroNode
        MacroNode.afterAddingToNetwork(self)
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        ## building macro network ##
        VirtualScreening_0 = self
        from traceback import print_exc
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        masterNet.getEditor().addLibraryInstance(wslib,"WebServices.VisionInterface.WSNodes", "wslib")
        from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
        try:
            addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory("http://kryptonite.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            ## saving node input Ports ##
            input_Ports_1 = self.macroNetwork.ipNode
            apply(input_Ports_1.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork"
            print_exc()
            input_Ports_1=None

        try:
            ## saving node output Ports ##
            output_Ports_2 = self.macroNetwork.opNode
            apply(output_Ports_2.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            output_Ports_2.move(217, 346)
        except:
            print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork"
            print_exc()
            output_Ports_2=None

        try:
            ## saving node PrepareReceptor ##
            from Adt.Macro.PrepareReceptor import PrepareReceptor
            PrepareReceptor_3 = PrepareReceptor(constrkw={}, name='PrepareReceptor', library=Adt)
            self.macroNetwork.addNode(PrepareReceptor_3,96,114)
            apply(PrepareReceptor_3.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            Pdb2pqrWS_6 = PrepareReceptor_3.macroNetwork.nodes[2]
            Pdb2pqrOpalService_ws_nbcr_net_10 = Pdb2pqrWS_6.macroNetwork.nodes[3]
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['noopt'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['phi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['psi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['verbose'].widget.set(1, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['chain'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['nodebump'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['chi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['ligand'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['hbond'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['with_ph'].widget.set(r"", run=False)
            apply(Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['forcefield'].widget.configure, (), {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['forcefield'].widget.set(r"AMBER", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['clean'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['inId'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['apbs_input'].widget.set(0, run=False)
            apply(Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['ffout'].widget.configure, (), {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['ffout'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['localRun'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['rama'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['execPath'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['assign_only'].widget.set(0, run=False)
            GetURLFromList_11 = Pdb2pqrWS_6.macroNetwork.nodes[4]
            GetURLFromList_11.inputPortByName['ext'].widget.set(r"pqr", run=False)

            ## saving connections for network Pdb2pqrWS ##
            Pdb2pqrWS_6.macroNetwork.freeze()
            Pdb2pqrWS_6.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_7 = Pdb2pqrWS_6.macroNetwork.ipNode
            input_Ports_7.outputPorts[1].configure(name='CheckFileFormat_value')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_8 = Pdb2pqrWS_6.macroNetwork.opNode
            output_Ports_8.inputPorts[1].configure(singleConnection='auto')
            output_Ports_8.inputPorts[2].configure(singleConnection='auto')
            output_Ports_8.inputPorts[1].configure(name='UpdateReceptor_receptor_obj')
            output_Ports_8.inputPorts[2].configure(name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_6.inputPorts[0].configure(name='CheckFileFormat_value')
            Pdb2pqrWS_6.inputPorts[0].configure(datatype='receptor')
            ## configure MacroNode input ports
            Pdb2pqrWS_6.outputPorts[0].configure(name='UpdateReceptor_receptor_obj')
            Pdb2pqrWS_6.outputPorts[0].configure(datatype='receptor')
            Pdb2pqrWS_6.outputPorts[1].configure(name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_6.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            Pdb2pqrWS_6.shrink()
            PrepareReceptorWS_13 = PrepareReceptor_3.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_17 = PrepareReceptorWS_13.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName['o'].widget.set(r"", run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName['v'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName['localRun'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName['execPath'].widget.set(r"", run=False)
            GetURLFromList_18 = PrepareReceptorWS_13.macroNetwork.nodes[4]
            GetURLFromList_18.inputPortByName['ext'].widget.set(r"pdbqt", run=False)
            DownloadToFile_19 = PrepareReceptorWS_13.macroNetwork.nodes[5]
            DownloadToFile_19.inputPortByName['overwrite'].widget.set(1, run=False)

            ## saving connections for network PrepareReceptorWS ##
            PrepareReceptorWS_13.macroNetwork.freeze()
            PrepareReceptorWS_13.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_14 = PrepareReceptorWS_13.macroNetwork.ipNode
            input_Ports_14.outputPorts[1].configure(name='CheckFileFormat_value')
            input_Ports_14.outputPorts[2].configure(name='PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_15 = PrepareReceptorWS_13.macroNetwork.opNode
            output_Ports_15.inputPorts[1].configure(singleConnection='auto')
            output_Ports_15.inputPorts[2].configure(singleConnection='auto')
            output_Ports_15.inputPorts[1].configure(name='UpdateReceptor_receptor_prepared_obj')
            output_Ports_15.inputPorts[2].configure(name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_13.inputPorts[0].configure(name='CheckFileFormat_value')
            PrepareReceptorWS_13.inputPorts[0].configure(datatype='receptor')
            PrepareReceptorWS_13.inputPorts[1].configure(name='PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptorWS_13.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptorWS_13.outputPorts[0].configure(name='UpdateReceptor_receptor_prepared_obj')
            PrepareReceptorWS_13.outputPorts[0].configure(datatype='receptor_prepared')
            PrepareReceptorWS_13.outputPorts[1].configure(name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_13.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptorWS_13.shrink()

            ## saving connections for network PrepareReceptor ##
            PrepareReceptor_3.macroNetwork.freeze()
            PrepareReceptor_3.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_4 = PrepareReceptor_3.macroNetwork.ipNode
            input_Ports_4.outputPorts[1].configure(name='Pdb2pqrWS_CheckFileFormat_value')
            input_Ports_4.outputPorts[2].configure(name='PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_5 = PrepareReceptor_3.macroNetwork.opNode
            output_Ports_5.inputPorts[1].configure(singleConnection='auto')
            output_Ports_5.inputPorts[2].configure(singleConnection='auto')
            output_Ports_5.inputPorts[1].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            output_Ports_5.inputPorts[2].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_3.inputPorts[0].configure(name='Pdb2pqrWS_CheckFileFormat_value')
            PrepareReceptor_3.inputPorts[0].configure(datatype='receptor')
            PrepareReceptor_3.inputPorts[1].configure(name='PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptor_3.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptor_3.outputPorts[0].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            PrepareReceptor_3.outputPorts[0].configure(datatype='receptor_prepared')
            PrepareReceptor_3.outputPorts[1].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_3.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptor_3.shrink()
            apply(PrepareReceptor_3.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore PrepareReceptor named PrepareReceptor in network self.macroNetwork"
            print_exc()
            PrepareReceptor_3=None

        try:
            ## saving node ComputeGrids ##
            from Adt.Macro.ComputeGrids import ComputeGrids
            ComputeGrids_21 = ComputeGrids(constrkw={}, name='ComputeGrids', library=Adt)
            self.macroNetwork.addNode(ComputeGrids_21,187,205)
            apply(ComputeGrids_21.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            prepareGPF_kryptonite_nbcr_net_25 = ComputeGrids_21.macroNetwork.nodes[3]
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['singlelib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['r_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['zpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['filter_file_url'].widget.set(r"", run=False)
            apply(prepareGPF_kryptonite_nbcr_net_25.inputPortByName['lib'].widget.configure, (), {'choices': ('sample', 'NCIDS_SC', 'NCI_DS1', 'NCI_DS2', 'oldNCI', 'human_metabolome', 'chembridge_building_blocks', 'drugbank_nutraceutics', 'drugbank_smallmol', 'fda_approved')})
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['lib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['ypoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['xcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['p'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['o'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['zcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['v'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['userlib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['xpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['localRun'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['ycenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['execPath'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_26 = ComputeGrids_21.macroNetwork.nodes[4]
            autogrid_kryptonite_nbcr_net_26.inputPortByName['infile_url'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['l'].widget.set(r"output.glg", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['o'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['p'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['localRun'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['execPath'].widget.set(r"", run=False)
            GetURLFromList_29 = ComputeGrids_21.macroNetwork.nodes[7]
            GetURLFromList_29.inputPortByName['ext'].widget.set(r"gpf", run=False)

            ## saving connections for network ComputeGrids ##
            ComputeGrids_21.macroNetwork.freeze()
            ComputeGrids_21.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_22 = ComputeGrids_21.macroNetwork.ipNode
            input_Ports_22.outputPorts[1].configure(name='GetComputeGridsInputs_ligands')
            input_Ports_22.outputPorts[2].configure(name='GetComputeGridsInputs_receptor_pdbqt')
            input_Ports_22.outputPorts[3].configure(name='GetComputeGridsInputs_gpf_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_23 = ComputeGrids_21.macroNetwork.opNode
            output_Ports_23.inputPorts[1].configure(singleConnection='auto')
            output_Ports_23.inputPorts[2].configure(singleConnection='auto')
            output_Ports_23.inputPorts[1].configure(name='MakeAutogridResultObj_autogrid_result_obj')
            output_Ports_23.inputPorts[2].configure(name='GetMainURLFromList_newurl')
            ComputeGrids_21.inputPorts[0].configure(name='GetComputeGridsInputs_ligands')
            ComputeGrids_21.inputPorts[0].configure(datatype='LigandDB')
            ComputeGrids_21.inputPorts[1].configure(name='GetComputeGridsInputs_receptor_pdbqt')
            ComputeGrids_21.inputPorts[1].configure(datatype='receptor_prepared')
            ComputeGrids_21.inputPorts[2].configure(name='GetComputeGridsInputs_gpf_obj')
            ComputeGrids_21.inputPorts[2].configure(datatype='gpf_template')
            ## configure MacroNode input ports
            ComputeGrids_21.outputPorts[0].configure(name='MakeAutogridResultObj_autogrid_result_obj')
            ComputeGrids_21.outputPorts[0].configure(datatype='autogrid_results')
            ComputeGrids_21.outputPorts[1].configure(name='GetMainURLFromList_newurl')
            ComputeGrids_21.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            ComputeGrids_21.shrink()
            apply(ComputeGrids_21.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore ComputeGrids named ComputeGrids in network self.macroNetwork"
            print_exc()
            ComputeGrids_21=None

        try:
            ## saving node AutodockVS ##
            from Adt.Macro.AutodockVS import AutodockVS
            AutodockVS_30 = AutodockVS(constrkw={}, name='AutodockVS', library=Adt)
            self.macroNetwork.addNode(AutodockVS_30,234,289)
            apply(AutodockVS_30.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            autodock_kryptonite_nbcr_net_34 = AutodockVS_30.macroNetwork.nodes[3]
            autodock_kryptonite_nbcr_net_34.inputPortByName['ga_run'].widget.set(r"", run=False)
            apply(autodock_kryptonite_nbcr_net_34.inputPortByName['lib'].widget.configure, (), {'choices': ('sample', 'NCIDS_SC', 'NCI_DS1', 'NCI_DS2', 'human_metabolome', 'chembridge_building_blocks', 'drugbank_nutraceutics', 'drugbank_smallmol', 'fda_approved')})
            autodock_kryptonite_nbcr_net_34.inputPortByName['lib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['filter_file_url'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['ga_num_evals'].widget.set(r"", run=False)
            apply(autodock_kryptonite_nbcr_net_34.inputPortByName['sched'].widget.configure, (), {'choices': ('SGE', 'CSF')})
            autodock_kryptonite_nbcr_net_34.inputPortByName['sched'].widget.set(r"SGE", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['ga_num_generations'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['userlib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['ga_pop_size'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['localRun'].widget.set(0, run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['email'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName['execPath'].widget.set(r"", run=False)

            ## saving connections for network AutodockVS ##
            AutodockVS_30.macroNetwork.freeze()
            AutodockVS_30.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_31 = AutodockVS_30.macroNetwork.ipNode
            input_Ports_31.outputPorts[1].configure(name='PrepareADVSInputs_ligands')
            input_Ports_31.outputPorts[2].configure(name='PrepareADVSInputs_autogrid_results')
            input_Ports_31.outputPorts[3].configure(name='PrepareADVSInputs_dpf_template_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_32 = AutodockVS_30.macroNetwork.opNode
            output_Ports_32.inputPorts[1].configure(singleConnection='auto')
            output_Ports_32.inputPorts[1].configure(name='GetMainURLFromList_newurl')
            AutodockVS_30.inputPorts[0].configure(name='PrepareADVSInputs_ligands')
            AutodockVS_30.inputPorts[0].configure(datatype='LigandDB')
            AutodockVS_30.inputPorts[1].configure(name='PrepareADVSInputs_autogrid_results')
            AutodockVS_30.inputPorts[1].configure(datatype='autogrid_results')
            AutodockVS_30.inputPorts[2].configure(name='PrepareADVSInputs_dpf_template_obj')
            AutodockVS_30.inputPorts[2].configure(datatype='dpf_template')
            ## configure MacroNode input ports
            AutodockVS_30.outputPorts[0].configure(name='GetMainURLFromList_newurl')
            AutodockVS_30.outputPorts[0].configure(datatype='string')
            ## configure MacroNode output ports
            AutodockVS_30.shrink()
            apply(AutodockVS_30.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore AutodockVS named AutodockVS in network self.macroNetwork"
            print_exc()
            AutodockVS_30=None

        #self.macroNetwork.run()
        self.macroNetwork.freeze()

        ## saving connections for network VirtualScreening ##
        input_Ports_1 = self.macroNetwork.ipNode
        if input_Ports_1 is not None and PrepareReceptor_3 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, PrepareReceptor_3, "new", "Pdb2pqrWS_CheckFileFormat_value", blocking=True
                    , splitratio=[0.73953989601548642, 0.35343455296743803])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and PrepareReceptor_3 in network self.macroNetwork"
        if input_Ports_1 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, ComputeGrids_21, "new", "GetComputeGridsInputs_ligands", blocking=True
                    , splitratio=[0.46529144721861959, 0.40210922169933605])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and ComputeGrids_21 in network self.macroNetwork"
        if input_Ports_1 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, AutodockVS_30, "ComputeGrids_GetComputeGridsInputs_ligands", "PrepareADVSInputs_ligands", blocking=True
                    , splitratio=[0.48337865988456058, 0.41105508936996049])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and AutodockVS_30 in network self.macroNetwork"
        if PrepareReceptor_3 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    PrepareReceptor_3, ComputeGrids_21, "PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj", "GetComputeGridsInputs_receptor_pdbqt", blocking=True
                    , splitratio=[0.32656364590133868, 0.43316260938324158])
            except:
                print "WARNING: failed to restore connection between PrepareReceptor_3 and ComputeGrids_21 in network self.macroNetwork"
        if ComputeGrids_21 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    ComputeGrids_21, AutodockVS_30, "MakeAutogridResultObj_autogrid_result_obj", "PrepareADVSInputs_autogrid_results", blocking=True
                    , splitratio=[0.25195726140883218, 0.37435524480319915])
            except:
                print "WARNING: failed to restore connection between ComputeGrids_21 and AutodockVS_30 in network self.macroNetwork"
        if input_Ports_1 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, ComputeGrids_21, "new", "GetComputeGridsInputs_gpf_obj", blocking=True
                    , splitratio=[0.3610566319618409, 0.20507643166097597])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and ComputeGrids_21 in network self.macroNetwork"
        if input_Ports_1 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, AutodockVS_30, "new", "PrepareADVSInputs_dpf_template_obj", blocking=True
                    , splitratio=[0.41221000935616448, 0.71284031297323347])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and AutodockVS_30 in network self.macroNetwork"
        output_Ports_2 = self.macroNetwork.opNode
        if AutodockVS_30 is not None and output_Ports_2 is not None:
            try:
                self.macroNetwork.connectNodes(
                    AutodockVS_30, output_Ports_2, "GetMainURLFromList_newurl", "new", blocking=True
                    , splitratio=[0.28632220295352073, 0.59933112675886213])
            except:
                print "WARNING: failed to restore connection between AutodockVS_30 and output_Ports_2 in network self.macroNetwork"
        if input_Ports_1 is not None and PrepareReceptor_3 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1, PrepareReceptor_3, "new", "PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C", blocking=True
                    , splitratio=[0.66210822612399844, 0.69280049494960727])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and PrepareReceptor_3 in network self.macroNetwork"
        self.macroNetwork.runOnNewData.value = False

        ## modifying MacroInputNode dynamic ports
        input_Ports_1 = self.macroNetwork.ipNode
        input_Ports_1.outputPorts[1].configure(name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        input_Ports_1.outputPorts[2].configure(name='ComputeGrids_GetComputeGridsInputs_ligands')
        input_Ports_1.outputPorts[3].configure(name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        input_Ports_1.outputPorts[4].configure(name='AutodockVS_PrepareADVSInputs_dpf_template_obj')
        input_Ports_1.outputPorts[5].configure(name='PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

        ## modifying MacroOutputNode dynamic ports
        output_Ports_2 = self.macroNetwork.opNode
        output_Ports_2.inputPorts[1].configure(singleConnection='auto')
        output_Ports_2.inputPorts[1].configure(name='AutodockVS_GetMainURLFromList_newurl')
        ## configure MacroNode input ports
        VirtualScreening_0.inputPorts[0].configure(name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        VirtualScreening_0.inputPorts[0].configure(datatype='receptor')
        VirtualScreening_0.inputPorts[1].configure(name='ComputeGrids_GetComputeGridsInputs_ligands')
        VirtualScreening_0.inputPorts[1].configure(datatype='LigandDB')
        VirtualScreening_0.inputPorts[2].configure(name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        VirtualScreening_0.inputPorts[2].configure(datatype='gpf_template')
        VirtualScreening_0.inputPorts[3].configure(name='AutodockVS_PrepareADVSInputs_dpf_template_obj')
        VirtualScreening_0.inputPorts[3].configure(datatype='dpf_template')
        VirtualScreening_0.inputPorts[4].configure(name='PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
        VirtualScreening_0.inputPorts[4].configure(datatype='boolean')
        ## configure MacroNode output ports
        VirtualScreening_0.outputPorts[0].configure(name='AutodockVS_GetMainURLFromList_newurl')
        VirtualScreening_0.outputPorts[0].configure(datatype='string')

        VirtualScreening_0.shrink()

        ## reset modifications ##
        VirtualScreening_0.resetTags()
        VirtualScreening_0.buildOriginalList()
    def afterAddingToNetwork(self):
        masterNet = self.macroNetwork
        from NetworkEditor.macros import MacroNode
        MacroNode.afterAddingToNetwork(self)
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        ## building macro network ##
        VirtualScreeningCSF_120 = self
        from traceback import print_exc
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        masterNet.getEditor().addLibraryInstance(wslib,"WebServices.VisionInterface.WSNodes", "wslib")
        from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
        try:
            addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory("http://oolitevm.calit2.optiputer.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory("http://kryptonite.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            ## saving node input Ports ##
            input_Ports_121 = self.macroNetwork.ipNode
            apply(input_Ports_121.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork"
            print_exc()
            input_Ports_121=None

        try:
            ## saving node output Ports ##
            output_Ports_122 = self.macroNetwork.opNode
            apply(output_Ports_122.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            output_Ports_122.move(217, 330)
        except:
            print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork"
            print_exc()
            output_Ports_122=None

        try:
            ## saving node PrepareReceptor ##
            from Adt.Macro.PrepareReceptor import PrepareReceptor
            PrepareReceptor_141 = PrepareReceptor(constrkw={}, name='PrepareReceptor', library=Adt)
            self.macroNetwork.addNode(PrepareReceptor_141,115,96)
            apply(PrepareReceptor_141.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            Pdb2pqrWS_144 = PrepareReceptor_141.macroNetwork.nodes[2]
            Pdb2pqrOpalService_ws_nbcr_net_148 = Pdb2pqrWS_144.macroNetwork.nodes[3]
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['noopt'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['phi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['psi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['verbose'].widget.set(1, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['chain'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['nodebump'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['chi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['ligand'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['hbond'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['with_ph'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['forcefield'].widget.set(r"AMBER", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['clean'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['inId'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['apbs_input'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['ffout'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['localRun'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['rama'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['execPath'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName['assign_only'].widget.set(0, run=False)
            GetURLFromList_149 = Pdb2pqrWS_144.macroNetwork.nodes[4]
            GetURLFromList_149.inputPortByName['ext'].widget.set(r"pqr", run=False)

            ## saving connections for network Pdb2pqrWS ##
            Pdb2pqrWS_144.macroNetwork.freeze()
            Pdb2pqrWS_144.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_145 = Pdb2pqrWS_144.macroNetwork.ipNode
            input_Ports_145.outputPorts[1].configure(name='CheckFileFormat_value')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_146 = Pdb2pqrWS_144.macroNetwork.opNode
            output_Ports_146.inputPorts[1].configure(singleConnection='auto')
            output_Ports_146.inputPorts[2].configure(singleConnection='auto')
            output_Ports_146.inputPorts[1].configure(name='UpdateReceptor_receptor_obj')
            output_Ports_146.inputPorts[2].configure(name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_144.inputPorts[0].configure(name='CheckFileFormat_value')
            Pdb2pqrWS_144.inputPorts[0].configure(datatype='receptor')
            ## configure MacroNode input ports
            Pdb2pqrWS_144.outputPorts[0].configure(name='UpdateReceptor_receptor_obj')
            Pdb2pqrWS_144.outputPorts[0].configure(datatype='receptor')
            Pdb2pqrWS_144.outputPorts[1].configure(name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_144.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            Pdb2pqrWS_144.shrink()
            PrepareReceptorWS_151 = PrepareReceptor_141.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_155 = PrepareReceptorWS_151.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName['o'].widget.set(r"", run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName['v'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName['localRun'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName['execPath'].widget.set(r"", run=False)
            GetURLFromList_156 = PrepareReceptorWS_151.macroNetwork.nodes[4]
            GetURLFromList_156.inputPortByName['ext'].widget.set(r"pdbqt", run=False)
            DownloadToFile_157 = PrepareReceptorWS_151.macroNetwork.nodes[5]
            DownloadToFile_157.inputPortByName['overwrite'].widget.set(1, run=False)

            ## saving connections for network PrepareReceptorWS ##
            PrepareReceptorWS_151.macroNetwork.freeze()
            PrepareReceptorWS_151.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_152 = PrepareReceptorWS_151.macroNetwork.ipNode
            input_Ports_152.outputPorts[1].configure(name='CheckFileFormat_value')
            input_Ports_152.outputPorts[2].configure(name='PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_153 = PrepareReceptorWS_151.macroNetwork.opNode
            output_Ports_153.inputPorts[1].configure(singleConnection='auto')
            output_Ports_153.inputPorts[2].configure(singleConnection='auto')
            output_Ports_153.inputPorts[1].configure(name='UpdateReceptor_receptor_prepared_obj')
            output_Ports_153.inputPorts[2].configure(name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_151.inputPorts[0].configure(name='CheckFileFormat_value')
            PrepareReceptorWS_151.inputPorts[0].configure(datatype='receptor')
            PrepareReceptorWS_151.inputPorts[1].configure(name='PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptorWS_151.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptorWS_151.outputPorts[0].configure(name='UpdateReceptor_receptor_prepared_obj')
            PrepareReceptorWS_151.outputPorts[0].configure(datatype='receptor_prepared')
            PrepareReceptorWS_151.outputPorts[1].configure(name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_151.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptorWS_151.shrink()

            ## saving connections for network PrepareReceptor ##
            PrepareReceptor_141.macroNetwork.freeze()
            PrepareReceptor_141.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_142 = PrepareReceptor_141.macroNetwork.ipNode
            input_Ports_142.outputPorts[1].configure(name='Pdb2pqrWS_CheckFileFormat_value')
            input_Ports_142.outputPorts[2].configure(name='PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_143 = PrepareReceptor_141.macroNetwork.opNode
            output_Ports_143.inputPorts[1].configure(singleConnection='auto')
            output_Ports_143.inputPorts[2].configure(singleConnection='auto')
            output_Ports_143.inputPorts[1].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            output_Ports_143.inputPorts[2].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_141.inputPorts[0].configure(name='Pdb2pqrWS_CheckFileFormat_value')
            PrepareReceptor_141.inputPorts[0].configure(datatype='receptor')
            PrepareReceptor_141.inputPorts[1].configure(name='PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptor_141.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptor_141.outputPorts[0].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            PrepareReceptor_141.outputPorts[0].configure(datatype='receptor_prepared')
            PrepareReceptor_141.outputPorts[1].configure(name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_141.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptor_141.shrink()
            apply(PrepareReceptor_141.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore PrepareReceptor named PrepareReceptor in network self.macroNetwork"
            print_exc()
            PrepareReceptor_141=None

        try:
            ## saving node ComputeGrids ##
            from Adt.Macro.ComputeGrids import ComputeGrids
            ComputeGrids_159 = ComputeGrids(constrkw={}, name='ComputeGrids', library=Adt)
            self.macroNetwork.addNode(ComputeGrids_159,136,207)
            apply(ComputeGrids_159.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            prepareGPF_kryptonite_nbcr_net_163 = ComputeGrids_159.macroNetwork.nodes[3]
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['singlelib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['r_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['zpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['filter_file_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['lib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['ypoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['xcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['p'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['o'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['zcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['v'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['userlib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['xpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['localRun'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['ycenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['execPath'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_164 = ComputeGrids_159.macroNetwork.nodes[4]
            autogrid_kryptonite_nbcr_net_164.inputPortByName['infile_url'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['l'].widget.set(r"output.glg", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['o'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['p'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['localRun'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['execPath'].widget.set(r"", run=False)
            GetURLFromList_167 = ComputeGrids_159.macroNetwork.nodes[7]
            GetURLFromList_167.inputPortByName['ext'].widget.set(r"gpf", run=False)

            ## saving connections for network ComputeGrids ##
            ComputeGrids_159.macroNetwork.freeze()
            ComputeGrids_159.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_160 = ComputeGrids_159.macroNetwork.ipNode
            input_Ports_160.outputPorts[1].configure(name='GetComputeGridsInputs_ligands')
            input_Ports_160.outputPorts[2].configure(name='GetComputeGridsInputs_receptor_pdbqt')
            input_Ports_160.outputPorts[3].configure(name='GetComputeGridsInputs_gpf_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_161 = ComputeGrids_159.macroNetwork.opNode
            output_Ports_161.inputPorts[1].configure(singleConnection='auto')
            output_Ports_161.inputPorts[2].configure(singleConnection='auto')
            output_Ports_161.inputPorts[1].configure(name='MakeAutogridResultObj_autogrid_result_obj')
            output_Ports_161.inputPorts[2].configure(name='GetMainURLFromList_newurl')
            ComputeGrids_159.inputPorts[0].configure(name='GetComputeGridsInputs_ligands')
            ComputeGrids_159.inputPorts[0].configure(datatype='LigandDB')
            ComputeGrids_159.inputPorts[1].configure(name='GetComputeGridsInputs_receptor_pdbqt')
            ComputeGrids_159.inputPorts[1].configure(datatype='receptor_prepared')
            ComputeGrids_159.inputPorts[2].configure(name='GetComputeGridsInputs_gpf_obj')
            ComputeGrids_159.inputPorts[2].configure(datatype='gpf_template')
            ## configure MacroNode input ports
            ComputeGrids_159.outputPorts[0].configure(name='MakeAutogridResultObj_autogrid_result_obj')
            ComputeGrids_159.outputPorts[0].configure(datatype='autogrid_results')
            ComputeGrids_159.outputPorts[1].configure(name='GetMainURLFromList_newurl')
            ComputeGrids_159.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            ComputeGrids_159.shrink()
            apply(ComputeGrids_159.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore ComputeGrids named ComputeGrids in network self.macroNetwork"
            print_exc()
            ComputeGrids_159=None

        try:
            ## saving node AutodockVsCSF ##
            from Adt.Macro.AutodockVsCSF import AutodockVsCSF
            AutodockVsCSF_168 = AutodockVsCSF(constrkw={}, name='AutodockVsCSF', library=Adt)
            self.macroNetwork.addNode(AutodockVsCSF_168,234,272)
            apply(AutodockVsCSF_168.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
            autodock_kryptonite_nbcr_net_172 = AutodockVsCSF_168.macroNetwork.nodes[3]
            autodock_kryptonite_nbcr_net_172.inputPortByName['ga_run'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['lib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['filter_file_url'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['ga_num_evals'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['sched'].widget.set(r"CSF", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['ga_num_generations'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['userlib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['ga_pop_size'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['localRun'].widget.set(0, run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['email'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['execPath'].widget.set(r"", run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175 = AutodockVsCSF_168.macroNetwork.nodes[6]
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName['execPath'].widget.set(r"", run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName['localRun'].widget.set(0, run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName['divisor'].widget.set(r"", run=False)

            ## saving connections for network AutodockVsCSF ##
            AutodockVsCSF_168.macroNetwork.freeze()
            AutodockVsCSF_168.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_169 = AutodockVsCSF_168.macroNetwork.ipNode
            input_Ports_169.outputPorts[1].configure(name='PrepareADVSInputs_ligands')
            input_Ports_169.outputPorts[2].configure(name='PrepareADVSInputs_autogrid_results')
            input_Ports_169.outputPorts[3].configure(name='PrepareADVSInputs_dpf_template_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_170 = AutodockVsCSF_168.macroNetwork.opNode
            output_Ports_170.inputPorts[1].configure(singleConnection='auto')
            output_Ports_170.inputPorts[1].configure(name='GetMainURLFromList_newurl')
            AutodockVsCSF_168.inputPorts[0].configure(name='PrepareADVSInputs_ligands')
            AutodockVsCSF_168.inputPorts[0].configure(datatype='LigandDB')
            AutodockVsCSF_168.inputPorts[1].configure(name='PrepareADVSInputs_autogrid_results')
            AutodockVsCSF_168.inputPorts[1].configure(datatype='autogrid_results')
            AutodockVsCSF_168.inputPorts[2].configure(name='PrepareADVSInputs_dpf_template_obj')
            AutodockVsCSF_168.inputPorts[2].configure(datatype='dpf_template')
            ## configure MacroNode input ports
            AutodockVsCSF_168.outputPorts[0].configure(name='GetMainURLFromList_newurl')
            AutodockVsCSF_168.outputPorts[0].configure(datatype='string')
            ## configure MacroNode output ports
            AutodockVsCSF_168.shrink()
            apply(AutodockVsCSF_168.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
        except:
            print "WARNING: failed to restore AutodockVsCSF named AutodockVsCSF in network self.macroNetwork"
            print_exc()
            AutodockVsCSF_168=None

        #self.macroNetwork.run()
        self.macroNetwork.freeze()

        ## saving connections for network VirtualScreeningCSF ##
        input_Ports_121 = self.macroNetwork.ipNode
        if input_Ports_121 is not None and PrepareReceptor_141 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, PrepareReceptor_141, "new", "Pdb2pqrWS_CheckFileFormat_value", blocking=True
                    , splitratio=[0.70852617526621731, 0.39749336046566702])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and PrepareReceptor_141 in network self.macroNetwork"
        if PrepareReceptor_141 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    PrepareReceptor_141, ComputeGrids_159, "PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj", "GetComputeGridsInputs_receptor_pdbqt", blocking=True
                    , splitratio=[0.35807693100671723, 0.50862337251735745])
            except:
                print "WARNING: failed to restore connection between PrepareReceptor_141 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, ComputeGrids_159, "new", "GetComputeGridsInputs_ligands", blocking=True
                    , splitratio=[0.40102167589221782, 0.6253111040879471])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, AutodockVsCSF_168, "ComputeGrids_GetComputeGridsInputs_ligands", "PrepareADVSInputs_ligands", blocking=True
                    , splitratio=[0.65260935115862417, 0.64296744661832661])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and AutodockVsCSF_168 in network self.macroNetwork"
        if ComputeGrids_159 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    ComputeGrids_159, AutodockVsCSF_168, "MakeAutogridResultObj_autogrid_result_obj", "PrepareADVSInputs_autogrid_results", blocking=True
                    , splitratio=[0.50054097826587762, 0.55954672420260165])
            except:
                print "WARNING: failed to restore connection between ComputeGrids_159 and AutodockVsCSF_168 in network self.macroNetwork"
        if input_Ports_121 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, ComputeGrids_159, "new", "GetComputeGridsInputs_gpf_obj", blocking=True
                    , splitratio=[0.73607423731241384, 0.54225043834950515])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, AutodockVsCSF_168, "new", "PrepareADVSInputs_dpf_template_obj", blocking=True
                    , splitratio=[0.24404719659126095, 0.41822006352735946])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and AutodockVsCSF_168 in network self.macroNetwork"
        if input_Ports_121 is not None and PrepareReceptor_141 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121, PrepareReceptor_141, "new", "PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C", blocking=True
                    , splitratio=[0.73098254809437191, 0.23999050334763958])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and PrepareReceptor_141 in network self.macroNetwork"
        output_Ports_122 = self.macroNetwork.opNode
        if AutodockVsCSF_168 is not None and output_Ports_122 is not None:
            try:
                self.macroNetwork.connectNodes(
                    AutodockVsCSF_168, output_Ports_122, "GetMainURLFromList_newurl", "new", blocking=True
                    , splitratio=[0.55528494083678659, 0.33476142488031579])
            except:
                print "WARNING: failed to restore connection between AutodockVsCSF_168 and output_Ports_122 in network self.macroNetwork"
        self.macroNetwork.runOnNewData.value = False

        ## modifying MacroInputNode dynamic ports
        input_Ports_121 = self.macroNetwork.ipNode
        input_Ports_121.outputPorts[1].configure(name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        input_Ports_121.outputPorts[2].configure(name='ComputeGrids_GetComputeGridsInputs_ligands')
        input_Ports_121.outputPorts[3].configure(name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        input_Ports_121.outputPorts[4].configure(name='AutodockVsCSF_PrepareADVSInputs_dpf_template_obj')
        input_Ports_121.outputPorts[5].configure(name='PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

        ## modifying MacroOutputNode dynamic ports
        output_Ports_122 = self.macroNetwork.opNode
        output_Ports_122.inputPorts[1].configure(singleConnection='auto')
        output_Ports_122.inputPorts[1].configure(name='AutodockVsCSF_GetMainURLFromList_newurl')
        ## configure MacroNode input ports
        VirtualScreeningCSF_120.inputPorts[0].configure(name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        VirtualScreeningCSF_120.inputPorts[0].configure(datatype='receptor')
        VirtualScreeningCSF_120.inputPorts[1].configure(name='ComputeGrids_GetComputeGridsInputs_ligands')
        VirtualScreeningCSF_120.inputPorts[1].configure(datatype='LigandDB')
        VirtualScreeningCSF_120.inputPorts[2].configure(name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        VirtualScreeningCSF_120.inputPorts[2].configure(datatype='gpf_template')
        VirtualScreeningCSF_120.inputPorts[3].configure(name='AutodockVsCSF_PrepareADVSInputs_dpf_template_obj')
        VirtualScreeningCSF_120.inputPorts[3].configure(datatype='dpf_template')
        VirtualScreeningCSF_120.inputPorts[4].configure(name='PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
        VirtualScreeningCSF_120.inputPorts[4].configure(datatype='boolean')
        ## configure MacroNode output ports
        VirtualScreeningCSF_120.outputPorts[0].configure(name='AutodockVsCSF_GetMainURLFromList_newurl')
        VirtualScreeningCSF_120.outputPorts[0].configure(datatype='string')

        VirtualScreeningCSF_120.shrink()

        ## reset modifications ##
        VirtualScreeningCSF_120.resetTags()
        VirtualScreeningCSF_120.buildOriginalList()
try:
    ## saving node Vina Config File Browser ##
    from Vision.StandardNodes import FileBrowserNE
    Vina_Config_File_Browser_1 = FileBrowserNE(constrkw={}, name='Vina Config File Browser', library=stdlib)
    masterNet.addNode(Vina_Config_File_Browser_1,849,41)
    Vina_Config_File_Browser_1.inputPortByName['filename'].widget.set(r"VinaVSlocal_0.1_input/test.config", run=False)
    apply(Vina_Config_File_Browser_1.configure, (), {'paramPanelImmediate': 1})
except:
    print "WARNING: failed to restore FileBrowserNE named Vina Config File Browser in network masterNet"
    print_exc()
    Vina_Config_File_Browser_1=None

try:
    ## saving node PrepareReceptor ##
    from Adt.Macro.PrepareReceptor import PrepareReceptor
    PrepareReceptor_2 = PrepareReceptor(constrkw={}, name='PrepareReceptor', library=Adt)
    masterNet.addNode(PrepareReceptor_2,151,197)
    apply(PrepareReceptor_2.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
    Pdb2pqrWS_5 = PrepareReceptor_2.macroNetwork.nodes[2]
    Pdb2pqrOpalService_ws_nbcr_net_9 = Pdb2pqrWS_5.macroNetwork.nodes[3]
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['noopt'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['phi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['psi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['verbose'].widget.set(1, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['chain'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['nodebump'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['chi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['ligand'].widget.set(r"", run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['hbond'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['with_ph'].widget.set(r"", run=False)
    apply(Pdb2pqrOpalService_ws_nbcr_net_9.inputPortByName['forcefield'].widget.configure, (), {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
Beispiel #4
0
    def afterAddingToNetwork(self):
        masterNet = self.macroNetwork
        from NetworkEditor.macros import MacroNode
        MacroNode.afterAddingToNetwork(self)
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        ## building macro network ##
        VirtualScreening_0 = self
        from traceback import print_exc
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        masterNet.getEditor().addLibraryInstance(
            wslib, "WebServices.VisionInterface.WSNodes", "wslib")
        from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
        try:
            addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory("http://kryptonite.nbcr.net/opal2",
                                    replace=False)
        except:
            pass
        try:
            ## saving node input Ports ##
            input_Ports_1 = self.macroNetwork.ipNode
            apply(input_Ports_1.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork"
            print_exc()
            input_Ports_1 = None

        try:
            ## saving node output Ports ##
            output_Ports_2 = self.macroNetwork.opNode
            apply(output_Ports_2.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            output_Ports_2.move(217, 346)
        except:
            print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork"
            print_exc()
            output_Ports_2 = None

        try:
            ## saving node PrepareReceptor ##
            from Adt.Macro.PrepareReceptor import PrepareReceptor
            PrepareReceptor_3 = PrepareReceptor(constrkw={},
                                                name='PrepareReceptor',
                                                library=Adt)
            self.macroNetwork.addNode(PrepareReceptor_3, 96, 114)
            apply(PrepareReceptor_3.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            Pdb2pqrWS_6 = PrepareReceptor_3.macroNetwork.nodes[2]
            Pdb2pqrOpalService_ws_nbcr_net_10 = Pdb2pqrWS_6.macroNetwork.nodes[
                3]
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'noopt'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'phi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'psi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'verbose'].widget.set(1, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'chain'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'nodebump'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'chi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'ligand'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'hbond'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'with_ph'].widget.set(r"", run=False)
            apply(
                Pdb2pqrOpalService_ws_nbcr_net_10.
                inputPortByName['forcefield'].widget.configure, (),
                {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'forcefield'].widget.set(r"AMBER", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'clean'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'inId'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'apbs_input'].widget.set(0, run=False)
            apply(
                Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['ffout'].
                widget.configure, (),
                {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'ffout'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'localRun'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'rama'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName[
                'assign_only'].widget.set(0, run=False)
            GetURLFromList_11 = Pdb2pqrWS_6.macroNetwork.nodes[4]
            GetURLFromList_11.inputPortByName['ext'].widget.set(r"pqr",
                                                                run=False)

            ## saving connections for network Pdb2pqrWS ##
            Pdb2pqrWS_6.macroNetwork.freeze()
            Pdb2pqrWS_6.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_7 = Pdb2pqrWS_6.macroNetwork.ipNode
            input_Ports_7.outputPorts[1].configure(
                name='CheckFileFormat_value')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_8 = Pdb2pqrWS_6.macroNetwork.opNode
            output_Ports_8.inputPorts[1].configure(singleConnection='auto')
            output_Ports_8.inputPorts[2].configure(singleConnection='auto')
            output_Ports_8.inputPorts[1].configure(
                name='UpdateReceptor_receptor_obj')
            output_Ports_8.inputPorts[2].configure(
                name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_6.inputPorts[0].configure(name='CheckFileFormat_value')
            Pdb2pqrWS_6.inputPorts[0].configure(datatype='receptor')
            ## configure MacroNode input ports
            Pdb2pqrWS_6.outputPorts[0].configure(
                name='UpdateReceptor_receptor_obj')
            Pdb2pqrWS_6.outputPorts[0].configure(datatype='receptor')
            Pdb2pqrWS_6.outputPorts[1].configure(
                name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_6.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            Pdb2pqrWS_6.shrink()
            PrepareReceptorWS_13 = PrepareReceptor_3.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_17 = PrepareReceptorWS_13.macroNetwork.nodes[
                3]
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName[
                'o'].widget.set(r"", run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName[
                'v'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName[
                'localRun'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_17.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            GetURLFromList_18 = PrepareReceptorWS_13.macroNetwork.nodes[4]
            GetURLFromList_18.inputPortByName['ext'].widget.set(r"pdbqt",
                                                                run=False)
            DownloadToFile_19 = PrepareReceptorWS_13.macroNetwork.nodes[5]
            DownloadToFile_19.inputPortByName['overwrite'].widget.set(
                1, run=False)

            ## saving connections for network PrepareReceptorWS ##
            PrepareReceptorWS_13.macroNetwork.freeze()
            PrepareReceptorWS_13.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_14 = PrepareReceptorWS_13.macroNetwork.ipNode
            input_Ports_14.outputPorts[1].configure(
                name='CheckFileFormat_value')
            input_Ports_14.outputPorts[2].configure(
                name='PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_15 = PrepareReceptorWS_13.macroNetwork.opNode
            output_Ports_15.inputPorts[1].configure(singleConnection='auto')
            output_Ports_15.inputPorts[2].configure(singleConnection='auto')
            output_Ports_15.inputPorts[1].configure(
                name='UpdateReceptor_receptor_prepared_obj')
            output_Ports_15.inputPorts[2].configure(
                name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_13.inputPorts[0].configure(
                name='CheckFileFormat_value')
            PrepareReceptorWS_13.inputPorts[0].configure(datatype='receptor')
            PrepareReceptorWS_13.inputPorts[1].configure(
                name='PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptorWS_13.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptorWS_13.outputPorts[0].configure(
                name='UpdateReceptor_receptor_prepared_obj')
            PrepareReceptorWS_13.outputPorts[0].configure(
                datatype='receptor_prepared')
            PrepareReceptorWS_13.outputPorts[1].configure(
                name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_13.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptorWS_13.shrink()

            ## saving connections for network PrepareReceptor ##
            PrepareReceptor_3.macroNetwork.freeze()
            PrepareReceptor_3.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_4 = PrepareReceptor_3.macroNetwork.ipNode
            input_Ports_4.outputPorts[1].configure(
                name='Pdb2pqrWS_CheckFileFormat_value')
            input_Ports_4.outputPorts[2].configure(
                name=
                'PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_5 = PrepareReceptor_3.macroNetwork.opNode
            output_Ports_5.inputPorts[1].configure(singleConnection='auto')
            output_Ports_5.inputPorts[2].configure(singleConnection='auto')
            output_Ports_5.inputPorts[1].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            output_Ports_5.inputPorts[2].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_3.inputPorts[0].configure(
                name='Pdb2pqrWS_CheckFileFormat_value')
            PrepareReceptor_3.inputPorts[0].configure(datatype='receptor')
            PrepareReceptor_3.inputPorts[1].configure(
                name=
                'PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptor_3.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptor_3.outputPorts[0].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            PrepareReceptor_3.outputPorts[0].configure(
                datatype='receptor_prepared')
            PrepareReceptor_3.outputPorts[1].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_3.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptor_3.shrink()
            apply(PrepareReceptor_3.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore PrepareReceptor named PrepareReceptor in network self.macroNetwork"
            print_exc()
            PrepareReceptor_3 = None

        try:
            ## saving node ComputeGrids ##
            from Adt.Macro.ComputeGrids import ComputeGrids
            ComputeGrids_21 = ComputeGrids(constrkw={},
                                           name='ComputeGrids',
                                           library=Adt)
            self.macroNetwork.addNode(ComputeGrids_21, 187, 205)
            apply(ComputeGrids_21.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            prepareGPF_kryptonite_nbcr_net_25 = ComputeGrids_21.macroNetwork.nodes[
                3]
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'singlelib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'r_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'zpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'filter_file_url'].widget.set(r"", run=False)
            apply(
                prepareGPF_kryptonite_nbcr_net_25.inputPortByName['lib'].
                widget.configure, (), {
                    'choices':
                    ('sample', 'NCIDS_SC', 'NCI_DS1', 'NCI_DS2', 'oldNCI',
                     'human_metabolome', 'chembridge_building_blocks',
                     'drugbank_nutraceutics', 'drugbank_smallmol',
                     'fda_approved')
                })
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'lib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'ypoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'xcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['p'].widget.set(
                r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['o'].widget.set(
                r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'zcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName['v'].widget.set(
                0, run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'userlib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'xpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'localRun'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'ycenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_25.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_26 = ComputeGrids_21.macroNetwork.nodes[
                4]
            autogrid_kryptonite_nbcr_net_26.inputPortByName[
                'infile_url'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['l'].widget.set(
                r"output.glg", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['o'].widget.set(
                0, run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName['p'].widget.set(
                r"", run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName[
                'localRun'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_26.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            GetURLFromList_29 = ComputeGrids_21.macroNetwork.nodes[7]
            GetURLFromList_29.inputPortByName['ext'].widget.set(r"gpf",
                                                                run=False)

            ## saving connections for network ComputeGrids ##
            ComputeGrids_21.macroNetwork.freeze()
            ComputeGrids_21.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_22 = ComputeGrids_21.macroNetwork.ipNode
            input_Ports_22.outputPorts[1].configure(
                name='GetComputeGridsInputs_ligands')
            input_Ports_22.outputPorts[2].configure(
                name='GetComputeGridsInputs_receptor_pdbqt')
            input_Ports_22.outputPorts[3].configure(
                name='GetComputeGridsInputs_gpf_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_23 = ComputeGrids_21.macroNetwork.opNode
            output_Ports_23.inputPorts[1].configure(singleConnection='auto')
            output_Ports_23.inputPorts[2].configure(singleConnection='auto')
            output_Ports_23.inputPorts[1].configure(
                name='MakeAutogridResultObj_autogrid_result_obj')
            output_Ports_23.inputPorts[2].configure(
                name='GetMainURLFromList_newurl')
            ComputeGrids_21.inputPorts[0].configure(
                name='GetComputeGridsInputs_ligands')
            ComputeGrids_21.inputPorts[0].configure(datatype='LigandDB')
            ComputeGrids_21.inputPorts[1].configure(
                name='GetComputeGridsInputs_receptor_pdbqt')
            ComputeGrids_21.inputPorts[1].configure(
                datatype='receptor_prepared')
            ComputeGrids_21.inputPorts[2].configure(
                name='GetComputeGridsInputs_gpf_obj')
            ComputeGrids_21.inputPorts[2].configure(datatype='gpf_template')
            ## configure MacroNode input ports
            ComputeGrids_21.outputPorts[0].configure(
                name='MakeAutogridResultObj_autogrid_result_obj')
            ComputeGrids_21.outputPorts[0].configure(
                datatype='autogrid_results')
            ComputeGrids_21.outputPorts[1].configure(
                name='GetMainURLFromList_newurl')
            ComputeGrids_21.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            ComputeGrids_21.shrink()
            apply(ComputeGrids_21.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore ComputeGrids named ComputeGrids in network self.macroNetwork"
            print_exc()
            ComputeGrids_21 = None

        try:
            ## saving node AutodockVS ##
            from Adt.Macro.AutodockVS import AutodockVS
            AutodockVS_30 = AutodockVS(constrkw={},
                                       name='AutodockVS',
                                       library=Adt)
            self.macroNetwork.addNode(AutodockVS_30, 234, 289)
            apply(AutodockVS_30.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            autodock_kryptonite_nbcr_net_34 = AutodockVS_30.macroNetwork.nodes[
                3]
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'ga_run'].widget.set(r"", run=False)
            apply(
                autodock_kryptonite_nbcr_net_34.inputPortByName['lib'].widget.
                configure, (), {
                    'choices':
                    ('sample', 'NCIDS_SC', 'NCI_DS1', 'NCI_DS2',
                     'human_metabolome', 'chembridge_building_blocks',
                     'drugbank_nutraceutics', 'drugbank_smallmol',
                     'fda_approved')
                })
            autodock_kryptonite_nbcr_net_34.inputPortByName['lib'].widget.set(
                r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'filter_file_url'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'ga_num_evals'].widget.set(r"", run=False)
            apply(
                autodock_kryptonite_nbcr_net_34.inputPortByName['sched'].
                widget.configure, (), {'choices': ('SGE', 'CSF')})
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'sched'].widget.set(r"SGE", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'ga_num_generations'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'userlib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'ga_pop_size'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'localRun'].widget.set(0, run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'email'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_34.inputPortByName[
                'execPath'].widget.set(r"", run=False)

            ## saving connections for network AutodockVS ##
            AutodockVS_30.macroNetwork.freeze()
            AutodockVS_30.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_31 = AutodockVS_30.macroNetwork.ipNode
            input_Ports_31.outputPorts[1].configure(
                name='PrepareADVSInputs_ligands')
            input_Ports_31.outputPorts[2].configure(
                name='PrepareADVSInputs_autogrid_results')
            input_Ports_31.outputPorts[3].configure(
                name='PrepareADVSInputs_dpf_template_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_32 = AutodockVS_30.macroNetwork.opNode
            output_Ports_32.inputPorts[1].configure(singleConnection='auto')
            output_Ports_32.inputPorts[1].configure(
                name='GetMainURLFromList_newurl')
            AutodockVS_30.inputPorts[0].configure(
                name='PrepareADVSInputs_ligands')
            AutodockVS_30.inputPorts[0].configure(datatype='LigandDB')
            AutodockVS_30.inputPorts[1].configure(
                name='PrepareADVSInputs_autogrid_results')
            AutodockVS_30.inputPorts[1].configure(datatype='autogrid_results')
            AutodockVS_30.inputPorts[2].configure(
                name='PrepareADVSInputs_dpf_template_obj')
            AutodockVS_30.inputPorts[2].configure(datatype='dpf_template')
            ## configure MacroNode input ports
            AutodockVS_30.outputPorts[0].configure(
                name='GetMainURLFromList_newurl')
            AutodockVS_30.outputPorts[0].configure(datatype='string')
            ## configure MacroNode output ports
            AutodockVS_30.shrink()
            apply(AutodockVS_30.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore AutodockVS named AutodockVS in network self.macroNetwork"
            print_exc()
            AutodockVS_30 = None

        #self.macroNetwork.run()
        self.macroNetwork.freeze()

        ## saving connections for network VirtualScreening ##
        input_Ports_1 = self.macroNetwork.ipNode
        if input_Ports_1 is not None and PrepareReceptor_3 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    PrepareReceptor_3,
                    "new",
                    "Pdb2pqrWS_CheckFileFormat_value",
                    blocking=True,
                    splitratio=[0.73953989601548642, 0.35343455296743803])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and PrepareReceptor_3 in network self.macroNetwork"
        if input_Ports_1 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    ComputeGrids_21,
                    "new",
                    "GetComputeGridsInputs_ligands",
                    blocking=True,
                    splitratio=[0.46529144721861959, 0.40210922169933605])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and ComputeGrids_21 in network self.macroNetwork"
        if input_Ports_1 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    AutodockVS_30,
                    "ComputeGrids_GetComputeGridsInputs_ligands",
                    "PrepareADVSInputs_ligands",
                    blocking=True,
                    splitratio=[0.48337865988456058, 0.41105508936996049])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and AutodockVS_30 in network self.macroNetwork"
        if PrepareReceptor_3 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    PrepareReceptor_3,
                    ComputeGrids_21,
                    "PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj",
                    "GetComputeGridsInputs_receptor_pdbqt",
                    blocking=True,
                    splitratio=[0.32656364590133868, 0.43316260938324158])
            except:
                print "WARNING: failed to restore connection between PrepareReceptor_3 and ComputeGrids_21 in network self.macroNetwork"
        if ComputeGrids_21 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    ComputeGrids_21,
                    AutodockVS_30,
                    "MakeAutogridResultObj_autogrid_result_obj",
                    "PrepareADVSInputs_autogrid_results",
                    blocking=True,
                    splitratio=[0.25195726140883218, 0.37435524480319915])
            except:
                print "WARNING: failed to restore connection between ComputeGrids_21 and AutodockVS_30 in network self.macroNetwork"
        if input_Ports_1 is not None and ComputeGrids_21 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    ComputeGrids_21,
                    "new",
                    "GetComputeGridsInputs_gpf_obj",
                    blocking=True,
                    splitratio=[0.3610566319618409, 0.20507643166097597])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and ComputeGrids_21 in network self.macroNetwork"
        if input_Ports_1 is not None and AutodockVS_30 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    AutodockVS_30,
                    "new",
                    "PrepareADVSInputs_dpf_template_obj",
                    blocking=True,
                    splitratio=[0.41221000935616448, 0.71284031297323347])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and AutodockVS_30 in network self.macroNetwork"
        output_Ports_2 = self.macroNetwork.opNode
        if AutodockVS_30 is not None and output_Ports_2 is not None:
            try:
                self.macroNetwork.connectNodes(
                    AutodockVS_30,
                    output_Ports_2,
                    "GetMainURLFromList_newurl",
                    "new",
                    blocking=True,
                    splitratio=[0.28632220295352073, 0.59933112675886213])
            except:
                print "WARNING: failed to restore connection between AutodockVS_30 and output_Ports_2 in network self.macroNetwork"
        if input_Ports_1 is not None and PrepareReceptor_3 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_1,
                    PrepareReceptor_3,
                    "new",
                    "PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C",
                    blocking=True,
                    splitratio=[0.66210822612399844, 0.69280049494960727])
            except:
                print "WARNING: failed to restore connection between input_Ports_1 and PrepareReceptor_3 in network self.macroNetwork"
        self.macroNetwork.runOnNewData.value = False

        ## modifying MacroInputNode dynamic ports
        input_Ports_1 = self.macroNetwork.ipNode
        input_Ports_1.outputPorts[1].configure(
            name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        input_Ports_1.outputPorts[2].configure(
            name='ComputeGrids_GetComputeGridsInputs_ligands')
        input_Ports_1.outputPorts[3].configure(
            name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        input_Ports_1.outputPorts[4].configure(
            name='AutodockVS_PrepareADVSInputs_dpf_template_obj')
        input_Ports_1.outputPorts[5].configure(
            name=
            'PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C'
        )

        ## modifying MacroOutputNode dynamic ports
        output_Ports_2 = self.macroNetwork.opNode
        output_Ports_2.inputPorts[1].configure(singleConnection='auto')
        output_Ports_2.inputPorts[1].configure(
            name='AutodockVS_GetMainURLFromList_newurl')
        ## configure MacroNode input ports
        VirtualScreening_0.inputPorts[0].configure(
            name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        VirtualScreening_0.inputPorts[0].configure(datatype='receptor')
        VirtualScreening_0.inputPorts[1].configure(
            name='ComputeGrids_GetComputeGridsInputs_ligands')
        VirtualScreening_0.inputPorts[1].configure(datatype='LigandDB')
        VirtualScreening_0.inputPorts[2].configure(
            name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        VirtualScreening_0.inputPorts[2].configure(datatype='gpf_template')
        VirtualScreening_0.inputPorts[3].configure(
            name='AutodockVS_PrepareADVSInputs_dpf_template_obj')
        VirtualScreening_0.inputPorts[3].configure(datatype='dpf_template')
        VirtualScreening_0.inputPorts[4].configure(
            name=
            'PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C'
        )
        VirtualScreening_0.inputPorts[4].configure(datatype='boolean')
        ## configure MacroNode output ports
        VirtualScreening_0.outputPorts[0].configure(
            name='AutodockVS_GetMainURLFromList_newurl')
        VirtualScreening_0.outputPorts[0].configure(datatype='string')

        VirtualScreening_0.shrink()

        ## reset modifications ##
        VirtualScreening_0.resetTags()
        VirtualScreening_0.buildOriginalList()
                                               name='Vina Config File Browser',
                                               library=stdlib)
    masterNet.addNode(Vina_Config_File_Browser_2, 798, 32)
    Vina_Config_File_Browser_2.inputPortByName['filename'].widget.set(
        r"VinaVSpublic_0.1_input/test.config", run=False)
    apply(Vina_Config_File_Browser_2.configure, (), {'paramPanelImmediate': 1})
except:
    print "WARNING: failed to restore FileBrowserNE named Vina Config File Browser in network masterNet"
    print_exc()
    Vina_Config_File_Browser_2 = None

try:
    ## saving node PrepareReceptor ##
    from Adt.Macro.PrepareReceptor import PrepareReceptor
    PrepareReceptor_3 = PrepareReceptor(constrkw={},
                                        name='PrepareReceptor',
                                        library=Adt)
    masterNet.addNode(PrepareReceptor_3, 151, 197)
    apply(PrepareReceptor_3.configure, (), {
        'paramPanelImmediate': 1,
        'expanded': False
    })
    Pdb2pqrWS_6 = PrepareReceptor_3.macroNetwork.nodes[2]
    Pdb2pqrOpalService_ws_nbcr_net_10 = Pdb2pqrWS_6.macroNetwork.nodes[3]
    Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['noopt'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['phi'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['psi'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_10.inputPortByName['verbose'].widget.set(
masterNet.getEditor().addLibraryInstance(
    wslib, "WebServices.VisionInterface.WSNodes", "wslib")

masterNet.getEditor().addLibraryInstance(stdlib, "Vision.StandardNodes",
                                         "stdlib")

from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
try:
    addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
except:
    pass
try:
    ## saving node PrepareReceptor2 ##
    from Adt.Macro.PrepareReceptor import PrepareReceptor
    PrepareReceptor2_0 = PrepareReceptor(constrkw={},
                                         name='PrepareReceptor2',
                                         library=Adt)
    masterNet.addNode(PrepareReceptor2_0, 301, 206)
    apply(PrepareReceptor2_0.configure, (), {
        'paramPanelImmediate': 1,
        'expanded': False
    })
    Pdb2pqrWS_3 = PrepareReceptor2_0.macroNetwork.nodes[2]
    Pdb2pqrOpalService_ws_nbcr_net_7 = Pdb2pqrWS_3.macroNetwork.nodes[3]
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['noopt'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['phi'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['psi'].widget.set(
        0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['verbose'].widget.set(
masterNet.getEditor().addLibraryInstance(Adt,"AutoDockTools.VisionInterface.Adt", "Adt")

masterNet.getEditor().addLibraryInstance(wslib,"WebServices.VisionInterface.WSNodes", "wslib")

masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib")

from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
try:
    addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
except:
    pass
try:
    ## saving node PrepareReceptor2 ##
    from Adt.Macro.PrepareReceptor import PrepareReceptor
    PrepareReceptor2_0 = PrepareReceptor(constrkw={}, name='PrepareReceptor2', library=Adt)
    masterNet.addNode(PrepareReceptor2_0,301,206)
    apply(PrepareReceptor2_0.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
    Pdb2pqrWS_3 = PrepareReceptor2_0.macroNetwork.nodes[2]
    Pdb2pqrOpalService_ws_nbcr_net_7 = Pdb2pqrWS_3.macroNetwork.nodes[3]
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['noopt'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['phi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['psi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['verbose'].widget.set(1, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['chain'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['nodebump'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['chi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['ligand'].widget.set(r"", run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['hbond'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['with_ph'].widget.set(r"", run=False)
    apply(Pdb2pqrOpalService_ws_nbcr_net_7.inputPortByName['forcefield'].widget.configure, (), {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})
    def afterAddingToNetwork(self):
        masterNet = self.macroNetwork
        from NetworkEditor.macros import MacroNode
        MacroNode.afterAddingToNetwork(self)
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        ## building macro network ##
        VirtualScreeningCSF_120 = self
        from traceback import print_exc
        from AutoDockTools.VisionInterface.Adt import Adt
        from WebServices.VisionInterface.WSNodes import wslib
        from Vision.StandardNodes import stdlib
        masterNet.getEditor().addLibraryInstance(
            wslib, "WebServices.VisionInterface.WSNodes", "wslib")
        from WebServices.VisionInterface.WSNodes import addOpalServerAsCategory
        try:
            addOpalServerAsCategory("http://ws.nbcr.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory(
                "http://oolitevm.calit2.optiputer.net/opal2", replace=False)
        except:
            pass
        try:
            addOpalServerAsCategory("http://kryptonite.nbcr.net/opal2",
                                    replace=False)
        except:
            pass
        try:
            ## saving node input Ports ##
            input_Ports_121 = self.macroNetwork.ipNode
            apply(input_Ports_121.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore MacroInputNode named input Ports in network self.macroNetwork"
            print_exc()
            input_Ports_121 = None

        try:
            ## saving node output Ports ##
            output_Ports_122 = self.macroNetwork.opNode
            apply(output_Ports_122.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            output_Ports_122.move(217, 330)
        except:
            print "WARNING: failed to restore MacroOutputNode named output Ports in network self.macroNetwork"
            print_exc()
            output_Ports_122 = None

        try:
            ## saving node PrepareReceptor ##
            from Adt.Macro.PrepareReceptor import PrepareReceptor
            PrepareReceptor_141 = PrepareReceptor(constrkw={},
                                                  name='PrepareReceptor',
                                                  library=Adt)
            self.macroNetwork.addNode(PrepareReceptor_141, 115, 96)
            apply(PrepareReceptor_141.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            Pdb2pqrWS_144 = PrepareReceptor_141.macroNetwork.nodes[2]
            Pdb2pqrOpalService_ws_nbcr_net_148 = Pdb2pqrWS_144.macroNetwork.nodes[
                3]
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'noopt'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'phi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'psi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'verbose'].widget.set(1, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'chain'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'nodebump'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'chi'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'ligand'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'hbond'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'with_ph'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'forcefield'].widget.set(r"AMBER", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'clean'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'inId'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'apbs_input'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'ffout'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'localRun'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'rama'].widget.set(0, run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            Pdb2pqrOpalService_ws_nbcr_net_148.inputPortByName[
                'assign_only'].widget.set(0, run=False)
            GetURLFromList_149 = Pdb2pqrWS_144.macroNetwork.nodes[4]
            GetURLFromList_149.inputPortByName['ext'].widget.set(r"pqr",
                                                                 run=False)

            ## saving connections for network Pdb2pqrWS ##
            Pdb2pqrWS_144.macroNetwork.freeze()
            Pdb2pqrWS_144.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_145 = Pdb2pqrWS_144.macroNetwork.ipNode
            input_Ports_145.outputPorts[1].configure(
                name='CheckFileFormat_value')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_146 = Pdb2pqrWS_144.macroNetwork.opNode
            output_Ports_146.inputPorts[1].configure(singleConnection='auto')
            output_Ports_146.inputPorts[2].configure(singleConnection='auto')
            output_Ports_146.inputPorts[1].configure(
                name='UpdateReceptor_receptor_obj')
            output_Ports_146.inputPorts[2].configure(
                name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_144.inputPorts[0].configure(name='CheckFileFormat_value')
            Pdb2pqrWS_144.inputPorts[0].configure(datatype='receptor')
            ## configure MacroNode input ports
            Pdb2pqrWS_144.outputPorts[0].configure(
                name='UpdateReceptor_receptor_obj')
            Pdb2pqrWS_144.outputPorts[0].configure(datatype='receptor')
            Pdb2pqrWS_144.outputPorts[1].configure(
                name='UpdateReceptor_pdb2pqr_result')
            Pdb2pqrWS_144.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            Pdb2pqrWS_144.shrink()
            PrepareReceptorWS_151 = PrepareReceptor_141.macroNetwork.nodes[3]
            PrepareReceptorOpalService_ws_nbcr_net_155 = PrepareReceptorWS_151.macroNetwork.nodes[
                3]
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName[
                'o'].widget.set(r"", run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName[
                'v'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName[
                'localRun'].widget.set(0, run=False)
            PrepareReceptorOpalService_ws_nbcr_net_155.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            GetURLFromList_156 = PrepareReceptorWS_151.macroNetwork.nodes[4]
            GetURLFromList_156.inputPortByName['ext'].widget.set(r"pdbqt",
                                                                 run=False)
            DownloadToFile_157 = PrepareReceptorWS_151.macroNetwork.nodes[5]
            DownloadToFile_157.inputPortByName['overwrite'].widget.set(
                1, run=False)

            ## saving connections for network PrepareReceptorWS ##
            PrepareReceptorWS_151.macroNetwork.freeze()
            PrepareReceptorWS_151.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_152 = PrepareReceptorWS_151.macroNetwork.ipNode
            input_Ports_152.outputPorts[1].configure(
                name='CheckFileFormat_value')
            input_Ports_152.outputPorts[2].configure(
                name='PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_153 = PrepareReceptorWS_151.macroNetwork.opNode
            output_Ports_153.inputPorts[1].configure(singleConnection='auto')
            output_Ports_153.inputPorts[2].configure(singleConnection='auto')
            output_Ports_153.inputPorts[1].configure(
                name='UpdateReceptor_receptor_prepared_obj')
            output_Ports_153.inputPorts[2].configure(
                name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_151.inputPorts[0].configure(
                name='CheckFileFormat_value')
            PrepareReceptorWS_151.inputPorts[0].configure(datatype='receptor')
            PrepareReceptorWS_151.inputPorts[1].configure(
                name='PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptorWS_151.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptorWS_151.outputPorts[0].configure(
                name='UpdateReceptor_receptor_prepared_obj')
            PrepareReceptorWS_151.outputPorts[0].configure(
                datatype='receptor_prepared')
            PrepareReceptorWS_151.outputPorts[1].configure(
                name='UpdateReceptor_receptor_result')
            PrepareReceptorWS_151.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptorWS_151.shrink()

            ## saving connections for network PrepareReceptor ##
            PrepareReceptor_141.macroNetwork.freeze()
            PrepareReceptor_141.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_142 = PrepareReceptor_141.macroNetwork.ipNode
            input_Ports_142.outputPorts[1].configure(
                name='Pdb2pqrWS_CheckFileFormat_value')
            input_Ports_142.outputPorts[2].configure(
                name=
                'PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_143 = PrepareReceptor_141.macroNetwork.opNode
            output_Ports_143.inputPorts[1].configure(singleConnection='auto')
            output_Ports_143.inputPorts[2].configure(singleConnection='auto')
            output_Ports_143.inputPorts[1].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            output_Ports_143.inputPorts[2].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_141.inputPorts[0].configure(
                name='Pdb2pqrWS_CheckFileFormat_value')
            PrepareReceptor_141.inputPorts[0].configure(datatype='receptor')
            PrepareReceptor_141.inputPorts[1].configure(
                name=
                'PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C')
            PrepareReceptor_141.inputPorts[1].configure(datatype='boolean')
            ## configure MacroNode input ports
            PrepareReceptor_141.outputPorts[0].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj')
            PrepareReceptor_141.outputPorts[0].configure(
                datatype='receptor_prepared')
            PrepareReceptor_141.outputPorts[1].configure(
                name='PrepareReceptorWS_UpdateReceptor_receptor_result')
            PrepareReceptor_141.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            PrepareReceptor_141.shrink()
            apply(PrepareReceptor_141.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore PrepareReceptor named PrepareReceptor in network self.macroNetwork"
            print_exc()
            PrepareReceptor_141 = None

        try:
            ## saving node ComputeGrids ##
            from Adt.Macro.ComputeGrids import ComputeGrids
            ComputeGrids_159 = ComputeGrids(constrkw={},
                                            name='ComputeGrids',
                                            library=Adt)
            self.macroNetwork.addNode(ComputeGrids_159, 136, 207)
            apply(ComputeGrids_159.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            prepareGPF_kryptonite_nbcr_net_163 = ComputeGrids_159.macroNetwork.nodes[
                3]
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'singlelib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'r_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'zpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'filter_file_url'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'lib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'ypoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'xcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['p'].widget.set(
                r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['o'].widget.set(
                r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'zcenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName['v'].widget.set(
                0, run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'userlib'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'xpoints'].widget.set(r"", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'localRun'].widget.set(0, run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'ycenter'].widget.set(r"auto", run=False)
            prepareGPF_kryptonite_nbcr_net_163.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_164 = ComputeGrids_159.macroNetwork.nodes[
                4]
            autogrid_kryptonite_nbcr_net_164.inputPortByName[
                'infile_url'].widget.set(r"", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['l'].widget.set(
                r"output.glg", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['o'].widget.set(
                0, run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName['p'].widget.set(
                r"", run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName[
                'localRun'].widget.set(0, run=False)
            autogrid_kryptonite_nbcr_net_164.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            GetURLFromList_167 = ComputeGrids_159.macroNetwork.nodes[7]
            GetURLFromList_167.inputPortByName['ext'].widget.set(r"gpf",
                                                                 run=False)

            ## saving connections for network ComputeGrids ##
            ComputeGrids_159.macroNetwork.freeze()
            ComputeGrids_159.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_160 = ComputeGrids_159.macroNetwork.ipNode
            input_Ports_160.outputPorts[1].configure(
                name='GetComputeGridsInputs_ligands')
            input_Ports_160.outputPorts[2].configure(
                name='GetComputeGridsInputs_receptor_pdbqt')
            input_Ports_160.outputPorts[3].configure(
                name='GetComputeGridsInputs_gpf_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_161 = ComputeGrids_159.macroNetwork.opNode
            output_Ports_161.inputPorts[1].configure(singleConnection='auto')
            output_Ports_161.inputPorts[2].configure(singleConnection='auto')
            output_Ports_161.inputPorts[1].configure(
                name='MakeAutogridResultObj_autogrid_result_obj')
            output_Ports_161.inputPorts[2].configure(
                name='GetMainURLFromList_newurl')
            ComputeGrids_159.inputPorts[0].configure(
                name='GetComputeGridsInputs_ligands')
            ComputeGrids_159.inputPorts[0].configure(datatype='LigandDB')
            ComputeGrids_159.inputPorts[1].configure(
                name='GetComputeGridsInputs_receptor_pdbqt')
            ComputeGrids_159.inputPorts[1].configure(
                datatype='receptor_prepared')
            ComputeGrids_159.inputPorts[2].configure(
                name='GetComputeGridsInputs_gpf_obj')
            ComputeGrids_159.inputPorts[2].configure(datatype='gpf_template')
            ## configure MacroNode input ports
            ComputeGrids_159.outputPorts[0].configure(
                name='MakeAutogridResultObj_autogrid_result_obj')
            ComputeGrids_159.outputPorts[0].configure(
                datatype='autogrid_results')
            ComputeGrids_159.outputPorts[1].configure(
                name='GetMainURLFromList_newurl')
            ComputeGrids_159.outputPorts[1].configure(datatype='string')
            ## configure MacroNode output ports
            ComputeGrids_159.shrink()
            apply(ComputeGrids_159.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore ComputeGrids named ComputeGrids in network self.macroNetwork"
            print_exc()
            ComputeGrids_159 = None

        try:
            ## saving node AutodockVsCSF ##
            from Adt.Macro.AutodockVsCSF import AutodockVsCSF
            AutodockVsCSF_168 = AutodockVsCSF(constrkw={},
                                              name='AutodockVsCSF',
                                              library=Adt)
            self.macroNetwork.addNode(AutodockVsCSF_168, 234, 272)
            apply(AutodockVsCSF_168.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
            autodock_kryptonite_nbcr_net_172 = AutodockVsCSF_168.macroNetwork.nodes[
                3]
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'ga_run'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName['lib'].widget.set(
                r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'filter_file_url'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'ga_num_evals'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'sched'].widget.set(r"CSF", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'ga_num_generations'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'userlib'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'ga_pop_size'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'localRun'].widget.set(0, run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'email'].widget.set(r"", run=False)
            autodock_kryptonite_nbcr_net_172.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175 = AutodockVsCSF_168.macroNetwork.nodes[
                6]
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName[
                'execPath'].widget.set(r"", run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName[
                'localRun'].widget.set(0, run=False)
            AutodockSlice_oolitevm_calit2_optiputer_net_175.inputPortByName[
                'divisor'].widget.set(r"", run=False)

            ## saving connections for network AutodockVsCSF ##
            AutodockVsCSF_168.macroNetwork.freeze()
            AutodockVsCSF_168.macroNetwork.unfreeze()

            ## modifying MacroInputNode dynamic ports
            input_Ports_169 = AutodockVsCSF_168.macroNetwork.ipNode
            input_Ports_169.outputPorts[1].configure(
                name='PrepareADVSInputs_ligands')
            input_Ports_169.outputPorts[2].configure(
                name='PrepareADVSInputs_autogrid_results')
            input_Ports_169.outputPorts[3].configure(
                name='PrepareADVSInputs_dpf_template_obj')

            ## modifying MacroOutputNode dynamic ports
            output_Ports_170 = AutodockVsCSF_168.macroNetwork.opNode
            output_Ports_170.inputPorts[1].configure(singleConnection='auto')
            output_Ports_170.inputPorts[1].configure(
                name='GetMainURLFromList_newurl')
            AutodockVsCSF_168.inputPorts[0].configure(
                name='PrepareADVSInputs_ligands')
            AutodockVsCSF_168.inputPorts[0].configure(datatype='LigandDB')
            AutodockVsCSF_168.inputPorts[1].configure(
                name='PrepareADVSInputs_autogrid_results')
            AutodockVsCSF_168.inputPorts[1].configure(
                datatype='autogrid_results')
            AutodockVsCSF_168.inputPorts[2].configure(
                name='PrepareADVSInputs_dpf_template_obj')
            AutodockVsCSF_168.inputPorts[2].configure(datatype='dpf_template')
            ## configure MacroNode input ports
            AutodockVsCSF_168.outputPorts[0].configure(
                name='GetMainURLFromList_newurl')
            AutodockVsCSF_168.outputPorts[0].configure(datatype='string')
            ## configure MacroNode output ports
            AutodockVsCSF_168.shrink()
            apply(AutodockVsCSF_168.configure, (), {
                'paramPanelImmediate': 1,
                'expanded': False
            })
        except:
            print "WARNING: failed to restore AutodockVsCSF named AutodockVsCSF in network self.macroNetwork"
            print_exc()
            AutodockVsCSF_168 = None

        #self.macroNetwork.run()
        self.macroNetwork.freeze()

        ## saving connections for network VirtualScreeningCSF ##
        input_Ports_121 = self.macroNetwork.ipNode
        if input_Ports_121 is not None and PrepareReceptor_141 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    PrepareReceptor_141,
                    "new",
                    "Pdb2pqrWS_CheckFileFormat_value",
                    blocking=True,
                    splitratio=[0.70852617526621731, 0.39749336046566702])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and PrepareReceptor_141 in network self.macroNetwork"
        if PrepareReceptor_141 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    PrepareReceptor_141,
                    ComputeGrids_159,
                    "PrepareReceptorWS_UpdateReceptor_receptor_prepared_obj",
                    "GetComputeGridsInputs_receptor_pdbqt",
                    blocking=True,
                    splitratio=[0.35807693100671723, 0.50862337251735745])
            except:
                print "WARNING: failed to restore connection between PrepareReceptor_141 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    ComputeGrids_159,
                    "new",
                    "GetComputeGridsInputs_ligands",
                    blocking=True,
                    splitratio=[0.40102167589221782, 0.6253111040879471])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    AutodockVsCSF_168,
                    "ComputeGrids_GetComputeGridsInputs_ligands",
                    "PrepareADVSInputs_ligands",
                    blocking=True,
                    splitratio=[0.65260935115862417, 0.64296744661832661])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and AutodockVsCSF_168 in network self.macroNetwork"
        if ComputeGrids_159 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    ComputeGrids_159,
                    AutodockVsCSF_168,
                    "MakeAutogridResultObj_autogrid_result_obj",
                    "PrepareADVSInputs_autogrid_results",
                    blocking=True,
                    splitratio=[0.50054097826587762, 0.55954672420260165])
            except:
                print "WARNING: failed to restore connection between ComputeGrids_159 and AutodockVsCSF_168 in network self.macroNetwork"
        if input_Ports_121 is not None and ComputeGrids_159 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    ComputeGrids_159,
                    "new",
                    "GetComputeGridsInputs_gpf_obj",
                    blocking=True,
                    splitratio=[0.73607423731241384, 0.54225043834950515])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and ComputeGrids_159 in network self.macroNetwork"
        if input_Ports_121 is not None and AutodockVsCSF_168 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    AutodockVsCSF_168,
                    "new",
                    "PrepareADVSInputs_dpf_template_obj",
                    blocking=True,
                    splitratio=[0.24404719659126095, 0.41822006352735946])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and AutodockVsCSF_168 in network self.macroNetwork"
        if input_Ports_121 is not None and PrepareReceptor_141 is not None:
            try:
                self.macroNetwork.connectNodes(
                    input_Ports_121,
                    PrepareReceptor_141,
                    "new",
                    "PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C",
                    blocking=True,
                    splitratio=[0.73098254809437191, 0.23999050334763958])
            except:
                print "WARNING: failed to restore connection between input_Ports_121 and PrepareReceptor_141 in network self.macroNetwork"
        output_Ports_122 = self.macroNetwork.opNode
        if AutodockVsCSF_168 is not None and output_Ports_122 is not None:
            try:
                self.macroNetwork.connectNodes(
                    AutodockVsCSF_168,
                    output_Ports_122,
                    "GetMainURLFromList_newurl",
                    "new",
                    blocking=True,
                    splitratio=[0.55528494083678659, 0.33476142488031579])
            except:
                print "WARNING: failed to restore connection between AutodockVsCSF_168 and output_Ports_122 in network self.macroNetwork"
        self.macroNetwork.runOnNewData.value = False

        ## modifying MacroInputNode dynamic ports
        input_Ports_121 = self.macroNetwork.ipNode
        input_Ports_121.outputPorts[1].configure(
            name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        input_Ports_121.outputPorts[2].configure(
            name='ComputeGrids_GetComputeGridsInputs_ligands')
        input_Ports_121.outputPorts[3].configure(
            name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        input_Ports_121.outputPorts[4].configure(
            name='AutodockVsCSF_PrepareADVSInputs_dpf_template_obj')
        input_Ports_121.outputPorts[5].configure(
            name=
            'PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C'
        )

        ## modifying MacroOutputNode dynamic ports
        output_Ports_122 = self.macroNetwork.opNode
        output_Ports_122.inputPorts[1].configure(singleConnection='auto')
        output_Ports_122.inputPorts[1].configure(
            name='AutodockVsCSF_GetMainURLFromList_newurl')
        ## configure MacroNode input ports
        VirtualScreeningCSF_120.inputPorts[0].configure(
            name='PrepareReceptor_Pdb2pqrWS_CheckFileFormat_value')
        VirtualScreeningCSF_120.inputPorts[0].configure(datatype='receptor')
        VirtualScreeningCSF_120.inputPorts[1].configure(
            name='ComputeGrids_GetComputeGridsInputs_ligands')
        VirtualScreeningCSF_120.inputPorts[1].configure(datatype='LigandDB')
        VirtualScreeningCSF_120.inputPorts[2].configure(
            name='ComputeGrids_GetComputeGridsInputs_gpf_obj')
        VirtualScreeningCSF_120.inputPorts[2].configure(
            datatype='gpf_template')
        VirtualScreeningCSF_120.inputPorts[3].configure(
            name='AutodockVsCSF_PrepareADVSInputs_dpf_template_obj')
        VirtualScreeningCSF_120.inputPorts[3].configure(
            datatype='dpf_template')
        VirtualScreeningCSF_120.inputPorts[4].configure(
            name=
            'PrepareReceptor_PrepareReceptorWS_PrepareReceptorOpalService_ws_nbcr_net_C'
        )
        VirtualScreeningCSF_120.inputPorts[4].configure(datatype='boolean')
        ## configure MacroNode output ports
        VirtualScreeningCSF_120.outputPorts[0].configure(
            name='AutodockVsCSF_GetMainURLFromList_newurl')
        VirtualScreeningCSF_120.outputPorts[0].configure(datatype='string')

        VirtualScreeningCSF_120.shrink()

        ## reset modifications ##
        VirtualScreeningCSF_120.resetTags()
        VirtualScreeningCSF_120.buildOriginalList()
try:
    ## saving node PublicServerLigandDB ##
    from Adt.Input.PublicServerLigandDB import PublicServerLigandDB
    PublicServerLigandDB_10 = PublicServerLigandDB(constrkw={}, name='PublicServerLigandDB', library=Adt)
    masterNet.addNode(PublicServerLigandDB_10,16,40)
    PublicServerLigandDB_10.inputPortByName['server_lib'].widget.set(r"sample", run=False)
except:
    print "WARNING: failed to restore PublicServerLigandDB named PublicServerLigandDB in network masterNet"
    print_exc()
    PublicServerLigandDB_10=None

try:
    ## saving node PrepareReceptor ##
    from Adt.Macro.PrepareReceptor import PrepareReceptor
    PrepareReceptor_11 = PrepareReceptor(constrkw={}, name='PrepareReceptor', library=Adt)
    masterNet.addNode(PrepareReceptor_11,408,153)
    apply(PrepareReceptor_11.configure, (), {'paramPanelImmediate': 1, 'expanded': False})
    Pdb2pqrWS_14 = PrepareReceptor_11.macroNetwork.nodes[2]
    Pdb2pqrOpalService_ws_nbcr_net_18 = Pdb2pqrWS_14.macroNetwork.nodes[3]
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['noopt'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['phi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['psi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['verbose'].widget.set(1, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['chain'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['nodebump'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['chi'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['ligand'].widget.set(r"", run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['hbond'].widget.set(0, run=False)
    Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['with_ph'].widget.set(r"", run=False)
    apply(Pdb2pqrOpalService_ws_nbcr_net_18.inputPortByName['forcefield'].widget.configure, (), {'choices': ('AMBER', 'CHARMM', 'PARSE', 'TYL06')})