You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which causes the molecule_pca_df dataframe to become empty because all rows in molecule_pca_df contain NaN values.
Here is the content of molecule_pca_df before the dropna() operation:
atom_id atom_name res_id res_name subst_name x y z \
0 1 N 29 GLY GLY29 14.147 -24.593 -65.068
0 4909 ZN 401 ZN ZN401 11.253 0.733 -47.095
1 2 CA 29 GLY GLY29 13.249 -24.578 -66.210
1 4910 ZN 402 ZN ZN402 8.294 -0.795 -52.209
10 11 CD1 30 LEU LEU30 10.536 -21.996 -60.915
.. ... ... ... ... ... ... ... ...
995 996 OG1 158 THR THR158 7.746 -9.586 -38.789
996 997 CG2 158 THR THR158 5.664 -10.472 -38.082
997 998 N 159 CYS CYS159 5.222 -7.439 -35.843
998 999 CA 159 CYS CYS159 4.161 -7.110 -34.882
999 1000 C 159 CYS CYS159 3.211 -6.002 -35.367
charge pc_type pc_id pc_atom_id
0 NaN HBD PEP_HBD_1 PEP_HBD_1_N
0 NaN HBD PEP_HBD_1 PEP_HBD_1_N
1 NaN NaN NaN NaN
1 NaN NaN NaN NaN
10 NaN H LEU_H_1 LEU_H_1_CD1
.. ... ... ... ...
995 NaN NaN NaN NaN
996 NaN NaN NaN NaN
997 NaN HBD PEP_HBD_1 PEP_HBD_1_N
998 NaN NaN NaN NaN
The following code checks whether every row in the DataFrame molecule_pca_df in line 480 contains at least one missing value,
print(molecule_pca_df.isnull().any(axis=1).all())
which returns:
True
Additional Context
Same behaviour is not observed on MOL2 file.
Possible solutions
calculate charges for PDB files (charges is used in 4D method)
# Add charges = 0 if not present in PDB fileifmolecule.df["charge"].isnull().all():
molecule.df["charge"] =0.0molecule.df.reset_index(drop=True, inplace=True)
The text was updated successfully, but these errors were encountered:
Issue Description
An error occurs when attempting to load a PDB file which does not contains charges using
BindingSite.from_file()
.Steps to Reproduce
Probable Cause
The issue appears to be related to the following line:
ratar/ratar/encoding.py
Line 480 in 197d3f4
which causes the
molecule_pca_df
dataframe to become empty because all rows in molecule_pca_df containNaN
values.Here is the content of molecule_pca_df before the
dropna()
operation:The following code checks whether every row in the DataFrame
molecule_pca_df
in line 480 contains at least one missing value,which returns:
Additional Context
Same behaviour is not observed on MOL2 file.
Possible solutions
add at line 277 of ratar.auxiliary._load_pdb
The text was updated successfully, but these errors were encountered: