If we have a SmallMoleculeComponent for a ligand, it can sometimes be useful to create an identical SmallMoleculeComponent but with a different name attribute. However, the following gives:
This appears to be because the dict given by SmallMoleculeComponent._to_dict lacks the name key, as on reconstruction with SmallMoleculeComponent._from_dict, this is pulled out of the underlying RDKit representation.
Ideally, it should be possible to use SmallMoleculeComponent.copy_with_replacements for name changes, as this works just fine with e.g. ProteinComponent.
If we have a
SmallMoleculeComponent
for a ligand, it can sometimes be useful to create an identicalSmallMoleculeComponent
but with a differentname
attribute. However, the following gives:This appears to be because the
dict
given bySmallMoleculeComponent._to_dict
lacks thename
key, as on reconstruction withSmallMoleculeComponent._from_dict
, this is pulled out of the underlying RDKit representation.Ideally, it should be possible to use
SmallMoleculeComponent.copy_with_replacements
for name changes, as this works just fine with e.g.ProteinComponent
.