helper = autopack.helper if helper is None and not NOGUI: import upy helperClass = upy.getHelperClass() helper = helperClass() else: import upy helperClass = upy.getHelperClass() helper = helperClass(vi="nogui") autopack.helper = helper recipe = "D:\\Data\\cellPACK_data\\cellPACK_database_1.1.0\\recipes\\HIV_VLP.1.1.json" #127 filename = recipe #"/Users/ludo/DEV/autopack_git/autoPACK_database_1.0.0/recipes/NM_Analysis_FigureA1.0.xml" fileName, fileExtension = os.path.splitext(filename) n = os.path.basename(fileName) h = Environment(name=n) #h.helper = helper recipe = n h.loadRecipe(filename) #recenter ingredient position according center. #should manually do the mesh ? for c in h.compartments: for ingr in c.surfaceRecipe.ingredients: ingr.positions = np.array(ingr.positions) - np.array(ingr.offset) ingr.sphereFile = None #save the recipe h.version = "1.2" h.saveRecipe( "D:\\Data\\cellPACK_data\\cellPACK_database_1.1.0\\recipes\\HIV_VLP.1.2.json", useXref=False, format_output="json")
centroids = np.loadtxt(data_folder + os.sep + fname + "_cl.txt") nProxy = len(centroids) R = np.linalg.norm(centroids, axis=1).max() + proxy_radius return [ centroids.tolist(), ], [ (np.ones(nProxy) * proxy_radius).tolist(), ], R, mesh, fname, center #X = ProteinAnalysis("MAEGEITTFTALTEKFNLPPGNYKKPKLLYCSNGGHFLRILPDGTVDGTRDRSDQHIQLQLSAESVGEVYIKSTETGQYLAMDTSGLLYGSQTPSEECLFLERLEENHYNTYTSKKHAEKNWFVGLKKNGSCKRGPRTHYGQKAILFLPLPV") #print(X.count_amino_acids()) #print(X.get_amino_acids_percent()) #print(X.molecular_weight()) left = [] env = Environment(name="MG") #c Cytosol #d DNA #e Extracellular Space #m Membrane #tc Terminal Organelle Cytosol #tm Terminal Organelle Membrane #rCyto = Recipe() ## sorted(numbers, key=str.lower) #for ing_name in sorted(ingrs_dic, key=unicode.lower): # ingrs_dic: # # either xref or defined # ing_dic = ingrs_dic[ing_name] # ingr = io_ingr.makeIngredientFromJson(inode=ing_dic, recipe=env.name) # rCyto.addIngredient(ingr) # # setup recipe