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

Can conda openmm-plumed use a custom plumed installation outside conda? #66

Closed
gitkol opened this issue Dec 2, 2022 · 4 comments
Closed

Comments

@gitkol
Copy link

gitkol commented Dec 2, 2022

Hi, I have been using OpenMM-PLUMED for a long time and always built the openmm-plumed plugin from source. The cmake builder has always been a bit difficult to use, but this time I couldn't get it to work at all on a new machine. So, I was very glad to see that the conda version of openmm-plumed exists. I installed it with no issues, but now I realize that it will always use the built-in PLUMED. My question is whether I can set environmental variables to make conda openmm-plumed use my PLUMED instead of the built-in one. I tried setting

export PATH=/home/istvan/opt/plumed-2.8.1_install/bin/:$PATH
export LD_LIBRARY_PATH=PATH=/home/istvan/opt/plumed-2.8.1_install/lib:$LD_LIBRARY_PATH

but that didn't help. Is there a solution to this?

Thank you very much for your kind assistance.

Best regards,

Istvan

@gitkol
Copy link
Author

gitkol commented Dec 2, 2022

I also tried adding this command at the top of my OpenMM-PLUMED Python script and set PYTHONPATH, but that didn't work either.

sys.path.insert(0, '/home/istvan/opt/plumed-2.8.1_install')

$ export PYTHONPATH=/home/istvan/opt/plumed-2.8.1_install

@peastman
Copy link
Member

peastman commented Dec 2, 2022

It ought to work. It just needs to link to libplumed.so. But it's possible python sets up the path so that the library installed by conda is always found before the one you specify in LD_LIBRARY_PATH. In that case, you might have to uninstall that version with

conda remove --force plumed

The --force option tells it to remove it without removing any of the packages that depend on it. That can be a dangerous thing to do, so I'd experiment on an environment you don't care about in case it gets messed up.

@gitkol
Copy link
Author

gitkol commented Dec 2, 2022

Thank you very much, Peter! Thanks for the quick reply and, indeed, 'conda remove --force plumed' did the trick. 'ldd /home/istvan/opt/plumed-2.8.1_install/bin/plumed' showed no missing libraries and 'Platform.getPluginLoadFailures()' also came up empty, everything is in order.

Thanks again,

Istvan

@peastman
Copy link
Member

peastman commented Dec 2, 2022

Great, glad that worked.

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