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

Inquiry about estimated errors. #208

Open
bowensha-tudelft opened this issue Dec 17, 2024 · 6 comments
Open

Inquiry about estimated errors. #208

bowensha-tudelft opened this issue Dec 17, 2024 · 6 comments

Comments

@bowensha-tudelft
Copy link

Hi. When I was using pAPRika, I am always confused by the error it gives. What can I do to reduce the error? I have tried to increase number of windows and elongate time scale of my simulations. But it seems they do not work very much.

@jaketanderson
Copy link
Collaborator

Hi Bowen, what's the particular error you see?

@bowensha-tudelft
Copy link
Author

The error given by paprika. Maybe it is called SEM? I tried to read the original paper but could not understand it well.

@jset231
Copy link

jset231 commented Jan 2, 2025

@bowensha-tudelft, Can you print or take a snapshot of the error you're getting? Maybe that would help us debug the issue

@slochower
Copy link
Member

I think @bowensha-tudelft may be asking about reducing the uncertainty in the estimate of dG. If that's the case, running longer in each window, using more windows, tweaking the force constants are all options. In general, the uncertainty in the estimate will go down with more sampling. There may be other sources of error, however, like the force field used to model the host and guest molecules.

@bowensha-tudelft
Copy link
Author

@bowensha-tudelft, Can you print or take a snapshot of the error you're getting? Maybe that would help us debug the issue

I am trying to run notebook-01 in paprika tutorials. I changed the host and guest to beta-cyclodextrin and hexanoate. I followed settings in the paper (https://pubs.acs.org/doi/10.1021/acs.jctc.5b00405). But the result is quite different.

I tried to make a graph of energy during the process (below). I use command like "plt.plot(attach_fractions,free_energy.results["attach"]["ti-block"]["fe_matrix"][0,:])". I am not sure if i use the right energy.

fe

When I in crease the force constants of dihedrals within beta-cyclodextrin, the energy will rise in attach phase (blue lines). Now the maximum is about 25 and if the force constants are larger, it will be like 75 but it does not fall in release phase. I guess I did something wrong. And sometimes the calculated binding affinity of bcd and hex is less than -100 kcal/mol. That definitely means there are many errors in my settings.

Here is my settings for constranints:

image
image

They are 14 dihedrals in beta-cyclodextrin, also mentioned in the paper.

image

@jset231
Copy link

jset231 commented Jan 2, 2025

Hmm, that is interesting; it could result from many different things. Just to make sure, are you getting a delta G (bind) around -100kcal/mol? That seems quite large and probably has something to do with the restraints. In explicit solvent, you should get closer to -10 kcal/mol.

Perhaps the atom mask is not specified correctly. As a sanity check, print out the atom indices of the DAT restraints and check if they correspond to the correct atoms.

for res in guest_restraints:
    print(res.index1, res.index2, res.index3, res.index4) 

Also for the target and force constant values, make sure you set the correct units with OpenFF-Units. For example:

from openff.units import unit as off_unit

r.attach["target"] = -112.5 * off_unit.degrees
r.attach["fc_final"] = 6.0 * off_unit.kilocalorie_per_mol / off_unit.degrees**2

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

4 participants