-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Desired feature/enhancement
automated toppar generation for ligands
Motivation
Currently the code expects the user to input an externally obtained .top/.param file that represents a given small molecule. This is good because it gives the user the option to input custom files specific to their case but it also adds an extra step needed before running our application. We could instead automatically generate the topologies and parameters when user does not provide them.
Description
One way to do it is to extend topoaa:
haddock3/src/haddock/modules/topology/topoaa/__init__.py
Lines 260 to 270 in c173db0
| if self.params["ligand_top_fname"]: | |
| custom_top = self.params["ligand_top_fname"] | |
| self.log(f"Using custom topology {custom_top}") | |
| libpdb.sanitize( | |
| model, | |
| overwrite=True, | |
| custom_topology=custom_top, | |
| ) | |
| else: | |
| libpdb.sanitize(model, overwrite=True) |
and in the else branch
else:
+ top, par: list[str]: libligand.identify_hetatms()
+ if top:
+ libpdb.sanitize(model, overwrite=True, custom_topology=top)
+ break
libpdb.sanitize(model, overwrite=True)This can be easily done using haddocking/prodrg and putting the functions in a new libligand
Additional context
I started working on adding this functionality to wenmr.science.uu.nl/haddock3 but it's better if the source code can handle this by itself without relying on an external feature, so it makes more sense for this to exist inside haddock3