Skip to content

How to output a spyrmsd.molecule.Molecule objectΒ #92

@Feya

Description

@Feya

If we want to load a Molecule, we may use the Molecule.from_rdkit(mol).
But If we want to output a spyrmsd.molecule.Molecule object as a .sdf for example, how shoule I do this?
I've tried to use RDkit SDWriter

writer = SDWriter("outputpath.sdf")
writer.write(mol)

it doesn't work becuase the SDWriter is supposed to apply to rdkit.Chem.rdchem.Mol object, not spyrmsd.molecule.Molecule object.

So my question is how could I output a spyrmsd.molecule.Molecule object to sdf file?
If there is no direct method, maybe we could transfer the spyrmsd.molecule.Molecule object to a rdkit.Chem.rdchem.Mol object first (without changing any of the conformer's coordinates) and then output using rdkit SDWriter. How shuold I do that?

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions