Observed behavior
A valid molsysmt.MolSys converted from a group-free RDKit molecule has n_groups == 0 and msm.has_attribute(system, 'group_name') == False. Querying msm.get(system, element='atom', group_name=True) raises a raw NumPy IndexError: arrays used as indices must be of integer (or boolean) type.
Reproduced with MolSysMT 0.21.0+606.ga03eb4bf6:
import molsysmt as msm
from rdkit import Chem
rdmol = Chem.AddHs(Chem.MolFromSmiles('c1ccccc1'))
system = msm.convert(rdmol, to_form='molsysmt.MolSys')
assert msm.get(system, n_groups=True) == 0
assert not msm.has_attribute(system, 'group_name')
msm.get(system, element='atom', group_name=True) # raw IndexError
Expected behavior
A missing group-level attribute should produce the documented unavailable-attribute result or a MolSysMT diagnostic. The user should not receive an internal indexing error. This issue does not ask MolSysMT to invent residue groups for RDKit molecules.
DockingMT impact and temporary workaround
uibcdf/dockingmt#9 accepts molecular inputs convertible to MolSysMT. An RDKit ligand with valid coordinates and chemistry failed in DockingMT preparation solely because it queried group_name. DockingMT now checks has_attribute first and supplies a local LIG label for its PDBQT projection when groups are absent. The workaround can be removed when the general MolSysMT query contract handles absent groups predictably. The ligand-readiness proposal #217 remains related but concerns chemical completeness, not this query failure.
Observed behavior
A valid
molsysmt.MolSysconverted from a group-free RDKit molecule hasn_groups == 0andmsm.has_attribute(system, 'group_name') == False. Queryingmsm.get(system, element='atom', group_name=True)raises a raw NumPyIndexError: arrays used as indices must be of integer (or boolean) type.Reproduced with MolSysMT
0.21.0+606.ga03eb4bf6:Expected behavior
A missing group-level attribute should produce the documented unavailable-attribute result or a MolSysMT diagnostic. The user should not receive an internal indexing error. This issue does not ask MolSysMT to invent residue groups for RDKit molecules.
DockingMT impact and temporary workaround
uibcdf/dockingmt#9accepts molecular inputs convertible to MolSysMT. An RDKit ligand with valid coordinates and chemistry failed in DockingMT preparation solely because it queriedgroup_name. DockingMT now checkshas_attributefirst and supplies a localLIGlabel for its PDBQT projection when groups are absent. The workaround can be removed when the general MolSysMT query contract handles absent groups predictably. The ligand-readiness proposal#217remains related but concerns chemical completeness, not this query failure.