'NoneType' object has no attribute 'coordinates' #96
|
I have read the tutorial but there are something wrong with my code: from spyrmsd import io, rmsd, molecule
...
ref_pose = os.path.join(crystal_dir, pdb_id, f'{pdb_id}_ligand.sdf')
ref = io.loadmol(ref_pose)
mol = io.loadmol(new_filepath)
ref = ref.strip()
mol = mol.strip()
coords_ref = ref.coordinates
anum_ref = ref.atomicnums
adj_ref = ref.adjacency_matrix
coords = mol.coordinates
anum = mol.atomicnums
adj = mol.adjacency_matrix
symm_rmsd_value = rmsd.symmrmsd(
coords_ref,
coords,
anum_ref,
anum,
adj_ref,
adj,
)Then it raises ERROR: |
Replies: 2 comments 4 replies
|
This error indicates that the |
|
@Dadiao-shuai, I got an e-mail notification with your question, but I can't see it anymore on GitHub. Did you remove it? (Please don't. It's a bit confusing for me, and every question is valuable for the community.) The RDKit error means that RDKit can't sanitise the molecule because of problems with your input file (specifically, there is a carbon with 6 bonds). This leads to the loaded molecule being I'll try to provide a better error message when molecules can't be loaded by RDKit or OpenBabel instead of having |
BTW, if you have
spyrmsdmolecules already, you can use thermsdwrapperfunction instead of passing the information directly tosymmrmsd. I should document this better for sure.spyrmsd/spyrmsd/rmsd.py
Lines 300 to 308 in 8d3c540