def modify_delete_index(collection_name, index, batoms = None): # Modify atom scale (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) print('Delete atoms') batoms.delete(index)
def modify_supercell(collection_name, supercell, batoms=None): # Modify atom scale (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) print('drawing atoms') batoms *= supercell batoms.draw()
def load_frames(collection_name, movie, batoms = None): """ """ from blase.bio import Blase print('Rendering atoms') coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) batoms.load_frames()
def render_atoms(collection_name, output_image = 'bout.png', batoms = None): """ """ from blase.bio import Blase print('Rendering atoms') coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) batoms.render(output_image = output_image)
def modify_color(collection_name, atoms_list, color, batoms=None): # Modify atom radius (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) print('drawing atoms') batoms.draw_atoms(props={atoms_list: { 'color': color, }})
def modify_boundary(collection_name, cutoff, batoms = None): # Modify atom cutoff (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) print('drawing atoms') batoms.coll.blase.boundary = cutoff # if batoms.atoms.pbc.any(): # batoms.draw_atoms_boundary(cutoff=cutoff) batoms.draw()
def modify_model_type(collection_name, model_type, batoms = None): # Modify atom scale (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) for obj in coll.all_objects: bpy.data.objects.remove(obj) print('drawing atoms') batoms.coll.blase.model_type = model_type batoms.draw()
def modify_pbc(collection_name, pbc, batoms=None): # Modify atom scale (all selected) coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) batoms.atoms.pbc = pbc
def modify_materials(collection_name, model_type, atoms=None): coll = bpy.data.collections[collection_name] if not batoms: batoms = read_blase_collection(coll) print('drawing atoms') batoms.draw_atoms()