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

ERROR CTab(/usr/local/reduce_wwPDB_het_dict.txt): could not open #60

Open
SabrinaKlotz opened this issue Jan 6, 2025 · 5 comments
Open

Comments

@SabrinaKlotz
Copy link

Hi,
I have installed reduce via conda as instructed in the README on a linux server and when I want to run a command like:
reduce -BUILD -Quiet AF-A5YKK6-F1-model_v4.pdb > AF-A5YKK6.pdb
I get the error: ERROR CTab(/usr/local/reduce_wwPDB_het_dict.txt): could not open
Is that normal or did I do something wrong? The file does exist, but not in usr/local/.

@russell-taylor
Copy link
Collaborator

@eunos-1128 Can you take a look at this? Thanks!

@eunos-1128
Copy link
Contributor

eunos-1128 commented Jan 7, 2025

@russell-taylor
As I have corrected in the PR, I think it is because the reference to reduce_wwPDB_het_dict.txt is fixed at /usr/local/reduce_wwPDB_het_dict.txt in the current source code.

@SabrinaKlotz
Until the fix is completed, copy reduce_wwPDB_het_dict.txt to /usr/local to run reduce, and you will not get any errors.

@russell-taylor
Copy link
Collaborator

It's actually a bit more complicated than that. The C executable itself must have a baked-in path. The CMakeLists.txt file defines the /usr/local location in HET_DICTIONARY for non-Windows platforms, and if it does not define it then main.cpp defines it as the name without a path (which will resolve locally).

One solution is to install reduce into /usr/local in the Conda installation, but that seems like it will go against the spirit of Conda because it wants to install things relative to the environment it is using, making a different location for each.

Another approach would be to modify the executable to look for the dictionary in the same directory where the program resides (different from the working directory at the time it was run). Unfortunately, this requires the C++-17 include and reduce must be compiled with much older compiler versions for its main use in CCTBX.

Perhaps the best approach would be to modify the CMakeLists.txt file so that a command-line argument can be specified to cmake that will set the directory, and then the Conda build can be modified to set that to the location where reduce will be installed when it builds the executable. If you want to do with this approach, I can modify the CMakeLists.txt file and you can then modify the Conda build to call it that way. If you're not building using CMake in Conda, then you can just add the -D command-line arguments to the compiler and set the correct location.

@eunos-1128
Copy link
Contributor

eunos-1128 commented Jan 8, 2025

@russell-taylor

I understand what the problem is, and will try to find a solution based on your comments.

@SabrinaKlotz
Copy link
Author

For me it works using the flag -DB to specify the location of the reduce_wwPDB_het_dict.txt , because I don't have the permission for /usr/local
Thank you for your comments!

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

3 participants