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

Question about generating *.box.pdb with mk_prepare_receptor.py #294

Closed
sasaju opened this issue Dec 25, 2024 · 3 comments
Closed

Question about generating *.box.pdb with mk_prepare_receptor.py #294

sasaju opened this issue Dec 25, 2024 · 3 comments

Comments

@sasaju
Copy link

sasaju commented Dec 25, 2024

I noticed that when calculating the coordinates of the box's vertices, int() is used instead of float(). Could this lead to discrepancies with the actual box calculation?

def box_to_pdb_string(box_center, npts, spacing=0.375):

step_x = int(npts[0] / 2.0) * spacing

@rwxayheee
Copy link
Contributor

Hi @sasaju
This function is only used to produce the output (box.pdb) to visualize the box. It will not change how the size of the box is determined. Calculation of the box size (calc_box) was done before this function is called in mk_prepare_receptor.py) and written by a different function box_to_vina_string to box.txt which is the config file for Vina.

But you're likely right that the int can cause a discrepancy between numbers in box.pdb and box.txt. Not very sure wether and why this was done intentionally. This function currently produces the boundary of the integer (with spacing = 1.0) grids given a specific center.

@diogomart
Copy link
Contributor

The actual grids will have a discrete number of points, both in autogrid and in vina. Autogrid even forces an odd number of grid points in each dimension (I don't know why). I don't remember why I wrote that exact equation.

@sasaju
Copy link
Author

sasaju commented Jan 3, 2025

Thanks for your response! 😁

@sasaju sasaju closed this as completed Jan 3, 2025
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

3 participants