Example file: 2a6d
Target: Extract the mesh information of CDR region from a antibody
PS: output may takes a while.
bg_color white color deepblue, 2a6d
select CDR1, 2a6d and chain B and resi 31-35 select CDR2, 2a6d and chain B and resi 50-66 select CDR3, 2a6d and chain B and resi 99-110 create cdr, CDR1 CDR2 CDR3
mesh.rotate_x(angle) # Rotate 45 degrees around the x-axis # mesh.rotate_y(angle) # Rotate around the y-axis # mesh.rotate_z(angle) # Rotate around the z-axis
# For rotation around an arbitrary axis (e.g., [1, 1, 1]), use: # mesh.rotate_vector([1, 1, 1], angle)
# Now you can plot the rotated mesh plotter = pv.Plotter() plotter.add_mesh(mesh) plotter.show()
Move the Model
import pyvista as pv
# Assume 'mesh' is your PyVista mesh # ...
# Translate the mesh translation_vector = [10, 0, 0] # This will move the mesh 10 units along the x-axis mesh.translate(translation_vector)
# Now you can plot the translated mesh plotter = pv.Plotter() plotter.add_mesh(mesh) plotter.show()