PDB-REDO / alphafill

AlphaFill is an algorithm based on sequence and structure similarity that “transplants” missing compounds to the AlphaFold models. By adding the molecular context to the protein structures, the models can be more easily appreciated in terms of function and structure integrity.
https://alphafill.eu
BSD 2-Clause "Simplified" License
89 stars 16 forks source link

CCP4 dependency #18

Closed mf-rug closed 1 year ago

mf-rug commented 1 year ago

Hi, it seems to me that CCP4 is an undocumented dependency.

alphafill crashed for me with an Error similar to this:

CCD components.cif file was not found
CCP4 monomers library not found, CLIBD_MON is not defined
Error when processing xxxx for AF-XXX
 >> Trying to insert unknown compound XXX (not found in CCD)

First I triple checked that alphafills' components.cif is provided, correct, and in the right place; but no change. Then I decided to install CCP4. This solved the problem because I could do CLIBD_MON=/opt/xtal/ccp4-8.0/lib/data/monomers/ /path/to/alphafill ...

or simply include an export CLIBD_MON=/opt/xtal/ccp4-8.0/lib/data/monomers/ in the .conf file.

mhekkel commented 1 year ago

CCP4 should not be needed. Provided that libcifpp is installed correctly. alphafill, and in fact all code depending on libcifpp, look for the components.cif file in the directories specified in libcifpp.

Theoretically, a new installation of libcifpp should create (by default) a /usr/local/share/libcifpp directory in which it should copy the dictionaries for cif as well as the components.cif file. It will also install a cron job that fetches a new set of these files in /var/cache/libcifpp provided that the /etc/libcifpp.conf file contains an uncommented line with 'update = true'

That's a lot of potential problems.

I'd like to know where this went wrong in your case. Do you use a Linux at all, or are you using Windows or MacOS?

mf-rug commented 1 year ago

This is on Linux. I couldn't get alphafill to work on MacOS due to the mrc dependence. I'll have a look at these folders. The weird thing is that CCP4 installation solved the crash.

mf-rug commented 1 year ago

In my case, libcifpp isn't in /usr/local/share/libcipp, instead:

$ ls ~/.local/share/libcifpp/
mmcif_ddl.dic  mmcif_ma.dic  mmcif_pdbx.dic  mmcif_pdbx_v50.dic

/var/cache/libcifpp also doesn't exist, neither does /etc/libcifpp.conf

I guess my libcifpp installation might not have gone correctly then? I guess it comes with ccp4 and that fixed it, because of:

$ ls /opt/xtal/ccp4-8.0/share/libcifpp
components.cif  mmcif_ddl.dic  mmcif_pdbx_v50.dic  rama-data.bin  torsion-data.bin
mhekkel commented 1 year ago

The best way to have your /var/cache/libcifpp directory and have it updated weekly is by installing libcifpp globally (using /usr/local as prefix e.g.). In the configure step you will also need to specify the -DCIFPP_INSTALL_UPDATE_SCRIPT=ON argument, although that is default these days.

Then, after installation, you still have to edit the /etc/libcifpp.conf file. When you specified /usr/ or /usr/local as prefix, it should have been created.

On FreeBSD there is/was a known problem with cmake, it would install the config file in /etc whereas it should be installed in /usr/local/etc. Perhaps this is already fixed by now.