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

Gradient optimization: ROUNDING_ERROR #19

Open
Yogesh1-11 opened this issue Mar 28, 2023 · 3 comments
Open

Gradient optimization: ROUNDING_ERROR #19

Yogesh1-11 opened this issue Mar 28, 2023 · 3 comments

Comments

@Yogesh1-11
Copy link

hi,

with plmc usage
my calculation ran to 90 steps but then terminated with the following error.
Found focus OsNIP2-1 as sequence 1
255 valid sequences out of 255
298 sites out of 882
Effective number of samples: 135.2 (80% identical neighborhood = 1.000 samples)
iter time cond fx -loglk ||h|| ||e||
1 0.8 39.06 44305.5 44222.6 90.5 1.0
..................................................................................
89 88.7 0.07 15355.1 7713.3 124.5 21.8
90 89.8 0.04 15355.0 7711.4 124.5 21.8
Gradient optimization: ROUNDING_ERROR

can someone specify what does the error says?

my command was
plmc -c score_couple -le 16.0 -lh 0.01 -m 100 -g -f uniprot_id2041 aaa.a2m

@aaronkollasch
Copy link
Contributor

Looking at lbfgs.c, it looks like this error happens when stp escapes from its bounds of stmin and stmax, which prevents further progress.

plmc/src/lib/lbfgs.c

Lines 909 to 913 in 18c9e55

/* Test for errors and convergence. */
if (brackt && ((*stp <= stmin || stmax <= *stp) || uinfo != 0)) {
/* Rounding errors prevent further progress. */
return LBFGSERR_ROUNDING_ERROR;
}

Did you compile plmc in double precision mode, or single precision?

It's possible that plmc had already converged before encountering a rounding error, so you could try just reducing the number of steps to below 90 in this case, rather than the default 100.

@Yogesh1-11
Copy link
Author

Yogesh1-11 commented Mar 28, 2023 via email

@aaronkollasch
Copy link
Contributor

It is possible to use a .model file in evcouplings, but it's not the standard way to use it so you may have to use the code directly. What are you intending to do with evcouplings?

The CouplingsModel package https://github.com/debbiemarkslab/EVcouplings/blob/af27842c5fc72c291831261c9a19849a3e313efd/evcouplings/couplings/model.py#L236 can load the .model file and predict sequence likelihoods.

If you modify the ec_file and model_file in the config, and remove the "couplings" section, you may be able to get the protocol to work with an arbitrary model file. https://github.com/debbiemarkslab/EVcouplings/blob/develop/config/sample_config_monomer.txt

The other option is to run the evcouplings pipeline with the "existing" alignment protocol to use your a2m file. https://github.com/debbiemarkslab/EVcouplings/blob/af27842c5fc72c291831261c9a19849a3e313efd/config/sample_config_monomer.txt#L126-L139
Or, run the full evcouplings pipeline.

I would leave the lambda penalties as their default values unless you have a reason to change them.

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