This is an experiment. Is a GitHub Gist comment a good way to log publically how I fixed an installation or similar issue?
See comments
This is an experiment. Is a GitHub Gist comment a good way to log publically how I fixed an installation or similar issue?
See comments
Getting the Python API of the CCDC CSD working is not too straightforward —the older documentation does not help.
The installation of CCDC is obviously needed so: ./CSDInstallerOffline-2023.3-linux --accept-licenses install uk.ac.cam.ccdc --root $CCDC_HOME -c
cleaner environment variables:
export CCDC_HOME=$HOME/CCDC
conda activate base
# conda install --channel=https://conda.ccdc.cam.ac.uk csd-python-api # does not work for me
cp -r $CCDC_HOME/ccdc-software/csd-python-api.minoconda $CONDA_PREFIX/envs/CDS
conda activate CSD
# following is an alternative to `$CCDC_HOME/ccdc-utilities/software-activation/bin/ccdc_activator -a -k 👾👾👾`
conda env config vars set CCDC_LICENSING_CONFIGURATION='la-code;👾👾👾'
conda env config vars set CCDC_TOOLKIT_ASER_DATABASE=$CCDC_HOME/ccdc-data/csd/as544be
conda env config vars set CCDC_TOOLKIT_SQLITE_DATABASE=$CCDC_HOME/ccdc-data/csd/as544be_ASER.sqlite
conda env config vars set CCDC_ISOSTAR_DATA_DIRECTORY=$CCDC_HOME/ccdc-data/isostar
conda env config vars set CCDC_MOGUL_DATA=$CCDC_HOME/ccdc-data/mogul
conda env config vars set CCDC_MOGUL_INITIALISATION_FILE=$CONDA_PREFIX/lib/python3.9/site-packages/ccdc/parameter_files/mogul.ini
conda env config vars set CCDC_CROSSMINER_DATABASE=$CCDC_HOME/ccdc-data/crossminer/csd_pdb_crossminer.feat
conda env config vars set CCDC_CROSSMINER_FEATURE_DEFINITIONS=$CCDC_HOME/ccdc-data/crossminer/feature_definitions
conda env config vars set GOLD_DIR=$CCDC_HOME/ccdc-software/gold/GOLD
# always good:
conda env config vars set PYTHONUSERBASE=$CONDA_PREFIX
conda deactivate
conda activate CSD
# this applied to my system only (Mac OS), was fine in Fedora
# First error: `Symbol not found: _png_create_info_struct` (Mac OS 14)
conda install anaconda::libpng
# also for my notebook
conda install ipykernel
Module file for CCDC CSD.
#%Module1.0
##
## csd23-module
## Module file for setting up environment for CSD23
## Written by Matteo Ferla — matteo.ferla@stats.ox.ac.uk
proc ModulesHelp { } {
puts stderr "\tAdds CSD23 CCDC Utilities and Software to your environment variables"
}
module-whatis "Adds CSD23 CCDC Utilities and Software to your environment variables"
set CCDC_HOME /vols/opig/apps/CSD23
prepend-path PATH /vols/opig/apps/CSD23/ccdc-utilities
prepend-path PATH /vols/opig/apps/CSD23/ccdc-software
setenv CCDC_LICENSING_CONFIGURATION "la-code;👾👾👾"
setenv CCDC_HOME /vols/opig/apps/CSD23
setenv CCDC_TOOLKIT_ASER_DATABASE $CCDC_HOME/ccdc-data/csd/as544be
setenv CCDC_TOOLKIT_SQLITE_DATABASE $CCDC_HOME/ccdc-data/csd/as544be_ASER.sqlite
setenv CCDC_ISOSTAR_DATA_DIRECTORY $CCDC_HOME/ccdc-data/isostar
setenv CCDC_MOGUL_DATA $CCDC_HOME/ccdc-data/mogul
setenv CCDC_MOGUL_INITIALISATION_FILE $CCDC_HOME/lib/python3.9/site-packages/ccdc/parameter_files/mogul.ini
setenv CCDC_CROSSMINER_DATABASE $CCDC_HOME/ccdc-data/crossminer/csd_pdb_crossminer.feat
setenv CCDC_CROSSMINER_FEATURE_DEFINITIONS $CCDC_HOME/ccdc-data/crossminer/feature_definitions
setenv GOLD_DIR $CCDC_HOME/ccdc-software/gold/GOLD
# Configure CONDA_ENVS_PATH
if { [info exists env(CONDA_ENVS_PATH)] } {
setenv CONDA_ENVS_PATH $env(CONDA_ENVS_PATH):/vols/opig/apps/conda310/envs/CSD
} else {set
setenv CONDA_ENVS_PATH /vols/opig/apps/conda310/envs/CSD
""
RDKit to OpenBabel
[10:11:18] Cannot convert ' 3.' to unsigned int on line 4
This is caused by no title line in the Mol_block.
smiles = 'CN(C)CCCN1c2ccccc2Sc3c1cccc3'
promazine = AllChem.AddHs(Chem.MolFromSmiles(smiles))
AllChem.EmbedMolecule(promazine)
# REQUIRED: promazine.SetProp('_Name', 'promazine')
conv = ob.OBConversion()
conv.SetInAndOutFormats('mol', 'mol')
obmol = ob.OBMol()
conv.ReadString(obmol, Chem.MolToMolBlock(promazine))
roundtrip = Chem.MolFromMolBlock(conv.WriteString(obmol).strip())
Jupyter decided to stop starting kernels after a pip install in conda base env. Cause: prompt-toolkit-3.0.42
giving error ModuleNotFoundError: No module named 'prompt_toolkit.output'
—ipython run, but import raised error. Fix was simply to pip install prompt-toolkit -U
to version 3.0.47.
Oddly, this applied to all conda envs.
One environment's kernel was still effe'ed, but fixed when disinstalled and reinstalled possibly due to lack of conda env config vars set PYTHONUSERBASE=$CONDA_PREFIX
Installation of the RDKit Postgres catridge