def use_table(self, tabletype, spacing=0.002): """Turn on the xvg table option, and generate a user-defined table defined in self.xvg_lines, generated by the TableMaker object, with the specifications:showParams OPTIONS tabletype = a TableMaker.Dielectric derived class: 'Switch_Shift' (default) GROMACS-style tapered cutoffs 'SF3' ShenFreed 3 table 'ReactionField' rxn field dielectric solvent model TableMaker examples: # table=TableMaker(spacing=0.002) # tabletype=SF3(length_scale=4.0) # tabletype=Switch_Shift() # tabletype=ReactionField(rc=1.0) # settings for eps->Infinity # tabletype.krf = 1.0 / ( 2.0 * tabletype.rc ) # tabletype.crf = 3.0 / ( 2.0 * tabletype.rc ) # table=table.make(tabletype) # print table """ self.use_xvg = True self.tabletype = tabletype self.tablemaker = TableMaker(spacing=spacing) self.tabletxt = self.tablemaker.make(self.tabletype) # set the user-table flags in the the mdp file self.setParameter('coulombtype', 'user') self.setParameter('vdwtype', 'user')
# the command line option. If the file doesn't exist, execution will stop net = kicad_netlist_reader.netlist(sys.argv[1]) Components = net.getInterestingComponents() # Create the NetList and componentList lists NetList = getNetList(net) componentList = getComponentList(net) # printNetList(NetList); # printComponentList(componentList); # Get an Anchor component and start Paths Tables = [] tableCount = 0 while (len(componentList) > 0): Tables.append(TableMaker()) table = Tables[tableCount] Paths = CablePaths() for component in componentList: if (component['isAnchor'] == True): # start Paths for i, connection in enumerate(component['connections']): position = connection['pin'] pathName = Paths.addPath(position, component['ref'], connection['net']) table.addPath(pathName) table.sortTable() # Add Headers for path in Paths.getPaths(): table.addComponent(component, path, Components, Paths.getPaths(), NetList)
# printNetList(NetList) # printComponentList(componentList) # Get an Anchor component and start Paths Tables = [] tableCount = 0 # if componentList does not change between consecutive iterations, terminate Pathing previousComponentList = [] while (len(componentList) > 0 and previousComponentList != componentList): import copy previousComponentList = copy.deepcopy(componentList) Paths = CablePaths() Tables.append(TableMaker(componentList, Paths, NetList)) table = Tables[tableCount] tableCount += 1 for component in componentList: if (component['isAnchor'] == True): # start Paths for i, connection in enumerate(component['connections']): position = connection['pin'] pathName = Paths.addPath(position, component['ref'], connection['net']) table.addPath(pathName) table.sortTable() # Add Headers for path in Paths.getPaths(): table.addComponent(component, path)