How to cast Molecule object to MoleculeGraph?

User 873a9ae9d0

21-06-2016 12:18:07

Hi,


I want to call the clean method from the chemaxon.calculations.clean.Cleaner class. This method needs as the first parameter a MoleculeGraph. But in my code I only have a Molecule object.


Question: How can I cast the Molecule object to a MoleculeGraph object?


 


hope someone can help.


Best regards


Hans-Juergen

ChemAxon 044c6721bc

21-06-2016 12:35:12

Hi,


Because the chemaxon.struc.Molecule extends from the chemaxon.struc.MoleculeGraph, you can use it in the chemaxon.calculations.clean.Cleaner class.


Janos

User 4535fea438

26-08-2016 02:15:19

Thanks for your reply. I solved the same problem in the solution you mentioned, and it turns out fine.