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

Modules missing when installing with conda #740

Open
jkosinski opened this issue Feb 28, 2022 · 8 comments
Open

Modules missing when installing with conda #740

jkosinski opened this issue Feb 28, 2022 · 8 comments

Comments

@jkosinski
Copy link

Hi,

When I install with conda create -n my_env -c conda-forge cctbx-base, modules probe, reduce, and chem_data are not being installed. Is there a way of installing them in the environment?

Best,
Jan

@bkpoon
Copy link
Member

bkpoon commented Mar 2, 2022

For probe and reduce, we are migrating to the probe and reduce code inside mmtbx. These are the mmtbx.probe2 and mmtbx.reduce2 commands. The work and testing is being done by the MolProbity folks at Duke (@chrisjwilliams).

The chem_data repository will not be included in the conda package because it is about 2 GB. We are in the planning stages of cleaning up and hosting chem_data in a public repository and then you could use an environment variable to point to that location or make a symbolic link to the directory inside your conda environment. We'll probably add a command to simplify this process.

If you have a Phenix installation, you can make a symbolic link to the path to chem_data in ${CONDA_PREFIX}/lib/python3.10/site-packages. That is for Python 3.10. Replace the python3.10 part with the version of Python in your active conda environment.

ln -s <Phenix installation>/modules/chem_data ${CONDA_PREFIX}/lib/python3.10/site-packages/

And then you can verify that there is a chem_data directory in ${CONDA_PREFIX}/lib/python3.10/site-packages/. After that, you can use the new mmtbx.probe2 and smtbx.reduce2 commands. But keep in mind that they are still being tested.

@bkpoon
Copy link
Member

bkpoon commented Mar 4, 2022

One additional note about chem_data, there are databases stored as pickle files that should be regenerated for Python 3. So if you are using the Phenix copy of chem_data, you should copy that directory somewhere first and then link the copied version to the conda environment.

Inside the chem_data directory, there are directories named cablam_data and rotarama_data. The files ending in .pickle and .dlite should be deleted. Then run the mmtbx.rebuild_cablam_cache and mmtbx.rebuild_rotarama_data commands in your environment to rebuild the databases.

@wenchangzhou-qtx
Copy link

Hey @bkpoon,

Thanks for having such a wonderful repo! I actually have a similiar issue with my installation. After I install with conda, I cannot see mmtxb.refinement package in it, am I missing something? Thanks

@bkpoon
Copy link
Member

bkpoon commented Mar 6, 2023

Can you describe which specific command or file is missing? I can do this with a newly created conda environment with cctbx-base. Are you having problems importing mmtbx.refinement? The chem_data directory still needs to come from Phenix right now.

@wenchangzhou-qtx
Copy link

Thanks @bkpoon I can run mmtbx.reduce but not mmtbx.refinement.

@bkpoon
Copy link
Member

bkpoon commented Mar 6, 2023

The refinement programs are in Phenix. We have phenix.refine for diffraction data and phenix.real_space_refine for fitting into maps. The underlying algorithms are in the mmtbx.refinement module (and other parts of cctbx), but the tools are part of Phenix.

@wenchangzhou-qtx
Copy link

Got it. I'm trying to use mmtbx.reifnement module to accomplish the same task as phenix.refine, is this possible within mmtbx?

@bkpoon
Copy link
Member

bkpoon commented Mar 6, 2023

Yes, it is possible, but it can get complicated if you are trying to reproduce all the functionality in phenix.refine. For example, phenix.refine refines specific things inside each macro cycle, like the coordinates or B-factors. The individual parts are in cctbx-base, but you would have to combine all the parts together. I would suggest that you get access to Phenix if you are trying to do something for production use.

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