LPDI-EPFL / masif

MaSIF- Molecular surface interaction fingerprints. Geometric deep learning to decipher patterns in molecular surfaces.
Apache License 2.0
571 stars 151 forks source link

StrBioInfo problem #38

Open tao840813 opened 2 years ago

tao840813 commented 2 years ago

Hi I have install StrBioInfo 0.9a0.dev1.

However, when I execute line "struct_assembly = struct.apply_biomolecule_matrices()[0]" in "00b-generate_assembly.py ",it show error AttributeError: 'PDBFrame' object has no attribute 'apply_biomolecule_matrices'

will this package gets update?

jaumebonet commented 2 years ago

Hi, you need to use version v0.2.2 https://pypi.org/project/StrBioInfo/0.2.2/#history, which is the one that supports python2 as needed for the script in this repo.

carlosmr12 commented 2 years ago

Not sure if you still need help with this, but I was able to get it working with the following setup for an anaconda environment, which did install StrBioInfo v0.2.2.

name: sbienv channels: - defaults - conda-forge - powerai dependencies: - strbioinfo

OtaviaW commented 2 years ago

How to install StrBioInfo v0.2.2 in the py3 env of this project?

jaumebonet commented 2 years ago

Hi, v0.2.2 of StrBioInfo only supports py2 https://pypi.org/project/StrBioInfo/#history the pre-release version there (StrBioInfo 0.9a0.dev1) will support py3, but not the functions needed by the pipeline of masif, as is a full rewrite as dev is in standby. You'll need to run this one script in a py2 environment.

OtaviaW commented 2 years ago

Hi, v0.2.2 of StrBioInfo only supports py2 https://pypi.org/project/StrBioInfo/#history the pre-release version there (StrBioInfo 0.9a0.dev1) will support py3, but not the functions needed by the pipeline of masif, as is a full rewrite as dev is in standby. You'll need to run this one script in a py2 environment.

Thanks for telling me this, but I am still confusing. Does it means that the data preprocess pipeline all need to run in a py2 environment or just masif_ligand app specifically.

jaumebonet commented 2 years ago

That I cannot say for sure. My guess is that only the script that depends on the SrtBioInfo runs in py2 and all the rest in py3.

ozkilim commented 1 year ago

Hi, v0.2.2 of StrBioInfo only supports py2 https://pypi.org/project/StrBioInfo/#history the pre-release version there (StrBioInfo 0.9a0.dev1) will support py3, but not the functions needed by the pipeline of masif, as is a full rewrite as dev is in standby. You'll need to run this one script in a py2 environment.

Thanks for telling me this, but I am still confusing. Does it means that the data preprocess pipeline all need to run in a py2 environment or just masif_ligand app specifically.

Only

python2.7 $masif_source/data_preparation/00b-generate_assembly.py $1 python2.7 $masif_source/data_preparation/00c-save_ligand_coords.py $1

run in python2. This is why in data_prepare_one.sh there is a line prior activating a python2 venv environment. After the two lines run we switch back to the python3 environment.

Basically you will need two separate environments and you must switch between them in the .sh script with "source your_python2_env/bin/activate"

I hope this helps!

Best, Oz

eduardoftoliveira commented 1 year ago

I just faced the same problem. 00b-generate_assembly.py just generates the biological assembly from the asymmetric unit present in the PDB file. This might not be relevant for all PDB files as for many the biological assembly is the asymmetric unit. If this is important, you can generate it with pymol. 00c-save_ligand_coords.py just saves the coordinates of the ligand and the atom types into 2 npy files. The PDB_ligand_coords.npy has the shape (n_molecules, n_atoms, 3) and contains the X,Y,Z coordinates of the atoms The PDB_ligand_types.npy has the shape (n_molecules,) and contains a string with the ligand name, e.g: 'NAD'

If it is just this, we can easily skip the SBI(StrBioInfo) library, but I didn't dig deep.