Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some questions about " compute_iface" #55

Open
pearl-rabbit opened this issue Mar 6, 2023 · 1 comment
Open

some questions about " compute_iface" #55

pearl-rabbit opened this issue Mar 6, 2023 · 1 comment

Comments

@pearl-rabbit
Copy link

pearl-rabbit commented Mar 6, 2023

Hello,@FreyrS .Could you answer the following two questions for me?Thank you in advance.
① In "01-pdb_extract_and_triangulate.py",what are the functions oflines 90-110?
② What is the meaning of d >= 2.0?Can it be set to other values?
③ What's the meaning of 'iface'.Can I set the value of "masif_opts ['compute_iface ']" to False?

Here are 90-110 lines of code:
if 'compute_iface' in masif_opts and masif_opts['compute_iface']:
# Compute the surface of the entire complex and from that compute the interface.
v3, f3, _, _, _ = computeMSMS(pdb_filename,
protonate=True)
# Regularize the mesh
mesh = pymesh.form_mesh(v3, f3)
# I believe It is not necessary to regularize the full mesh. This can speed up things by a lot.
full_regular_mesh = mesh
# Find the vertices that are in the iface.
v3 = full_regular_mesh.vertices
# Find the distance between every vertex in regular_mesh.vertices and those in the full complex.
kdt = KDTree(v3)
d, r = kdt.query(regular_mesh.vertices)
d = np.square(d) # Square d, because this is how it was in the pyflann version.
assert(len(d) == len(regular_mesh.vertices))
iface_v = np.where(d >= 2.0)[0]
iface[iface_v] = 1.0
# Convert to ply and save.
save_ply(out_filename1+".ply", regular_mesh.vertices,
regular_mesh.faces, normals=vertex_normal, charges=vertex_charges,
normalize_charges=True, hbond=vertex_hbond, hphob=vertex_hphobicity,
iface=iface)

@maxy0617
Copy link

Hi! 'iface' stands for 'interaction face', for Q2, d is the distance between the two interacting subelements. According to my using experience, for your Q3, if you are running masif on a single chain, it's ok to set masif_opts ['compute_iface '] = False, as for a single chain the output will be all zeros. Hope this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants