module 'spyrmsd.molecule' has no attribute 'load' #97
Answered
by
RMeli
JonasLi-19
asked this question in
Q&A
-
Hello, I met an error when using spyrmsd:
from spyrmsd import molecule
from spyrmsd import rmsd
ref_molecule = molecule.load("reference.mol")
docked_molecule = molecule.load("docked.mol")
# Get the coordinates
ref_coords = ref_molecule.coordinates
docked_coords = docked_molecule.coordinates
# Get the adjacency matrices
ref_adjacency_matrix = ref_molecule.adjacency
docked_adjacency_matrix = docked_molecule.adjacency
# Calculate symmetry-corrected RMSD
symm_rmsd_value = rmsd.symmrmsd(
ref_coords, docked_coords, ref_adjacency_matrix, docked_adjacency_matrix
)
print(f"Symmetry-corrected RMSD: {symm_rmsd_value}") |
Beta Was this translation helpful? Give feedback.
Answered by
RMeli
Dec 29, 2023
Replies: 1 comment 2 replies
-
The molecule class has no method Did you see this usage somewhere in the documentation? Please see the documentation on how to load molecules: you need to use |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
RMeli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The molecule class has no method
load
. It only hasfrom_rdkit
andfrom_openbabel
constructors to make aspyrmsd.molecule
from an already loaded RDKit or Open Babel molecule object.Did you see this usage somewhere in the documentation? Please see the documentation on how to load molecules: you need to use
loadmol
from theio
module.