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

Exclude a ligand directory from CalcSet calculations #28

Open
avnikonenko opened this issue Jan 6, 2025 · 3 comments
Open

Exclude a ligand directory from CalcSet calculations #28

avnikonenko opened this issue Jan 6, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@avnikonenko
Copy link

avnikonenko commented Jan 6, 2025

Hi!

INFO - 2025-01-06 19:13:34,995 - Leg (type = BOUND)_148545 - Selecting restraints for run 3...                                                                          
INFO:MDAnalysis.core.universe:The attribute(s) types, masses have already been read from the topology file. The guesser will only guess empty values for this attribute,
 if any exists. To overwrite it by completely guessed values, you can pass the attribute to the force_guess parameter instead of the to_guess one                       
INFO:MDAnalysis.guesser.base:There is no empty types values. Guesser did not guess any new values for types attribute                                                   
INFO:MDAnalysis.guesser.base:There is no empty masses values. Guesser did not guess any new values for masses attribute                                                 
Searching for low variance pairs. Frame no: 100%|███████████████████████████████████████████████████████████████████████████████████| 2501/2501 [01:44<00:00, 23.89it/s]
Scoring candidate Boresch anchor points. Anchor set no: 100%|███████████████████████████████████████████████████████████████████████████| 50/50 [04:51<00:00,  5.83s/it]
ERROR - 2025-01-06 19:20:11,852 - CalcSet_55711 - Error setting up calculation in calc_set/2FX6_ligand_correctst
reo: No candidate sets of Boresch restraints are suitable. Please expand search criteria or increase force constants.                       

I assume that this particular complex has a problem with protonation. Is it possible to remove this complex from the already finished calculations and not start everything again? When I moved the directory and re-ran the same script, 2FX6_ligand_correctstereo directory was created again without any file, creating an issue with missing files.

@fjclark
Copy link
Collaborator

fjclark commented Jan 7, 2025

Hi!

Like you say, I've seen this most often when a ligand is unstable in the binding site (due to incorrect protonation etc.) and drifts out into solution - it might be worth checking out the trajectory 2FX6_ligand_correctstereo/bound/ensemble_equilibration_3 (might be named slightly differently) to see what's happening.

The easiest way to do this is to update the CalcSet object before you remove the files. If you've still got the directory, you can move it back, then run

import a3fe as a3
calc_set = a3.CalcSet(calc_paths=[CHANGEME: your calc paths...])
calc_set.calc_paths.remove("CHANGEME: absolute path to 2FX6_ligand_correctstereo")
calc_set.save()

Now you should be able to remove the 2FX6 ligand without issues.

Alternatively, you could delete the CalcSet.pkl object (where the state information is saved to and read from) and just create a new one with the already-run calculations. You won't lose anything expensive since if you've already analysed the calculations then the CalcSet object should just read the saved free energies from each calculation.

I'll keep this open until I've added something to the docs about this. In general, CalcSet is the least well-developed part of the code and we should look at making it better.

Hope that works!

@avnikonenko
Copy link
Author

avnikonenko commented Jan 18, 2025

Everything worked fine, thank you!
But as a question for the future - what do you think about adding the ability to ignore failed runs in CalcSet? When you run calculations of hundreds of complexes, it's a pity that all runs stop only because of one problematic complex (which can be calculated separately after fixing).

@fjclark fjclark added the enhancement New feature or request label Jan 19, 2025
@fjclark fjclark self-assigned this Jan 19, 2025
@fjclark
Copy link
Collaborator

fjclark commented Jan 19, 2025

Great!

Thanks for the suggestion - I completely agree it's a design flaw and I'll think about the best way to do that.

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

No branches or pull requests

2 participants