Re: [Rdkit-discuss] Split molecule into rings and store as mol object/SMILES in list
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Sarah L. <Sar...@ic...> - 2011-09-16 09:38:56
|
Hi Eddie, Thanks, that's exactly what I needed. Sarah On 16 Sep 2011, at 00:24, Eddie Cao wrote: > Hi Sarah, > > You can use the GetRingInfo followed by PathToSubmol to get a > molecular object. For example: > > >>> from rdkit.Chem import * > >>> mol = > MolFromSmiles > ('O=C(C(C(O)=O)=CN(C1CC1)C2=C3)C2=CC(F)=C3N(C4)C(C5)CC4N5C') > >>> rings = mol.GetRingInfo().BondRings() > >>> rings > ((6, 25, 7), (18, 19, 21, 22, 28), (20, 21, 22, 23, 29), (12, 26, 9, > 5, 4, 11), (27, 16, 14, 13, 26, 10)) > >>> MolToSmiles(PathToSubmol(mol, rings[0])) > 'C1CC1' > >>> [MolToSmiles(PathToSubmol(mol, ring)) for ring in rings] > ['C1CC1', 'C1CCNC1', 'C1CCNC1', 'c1ccncc1', 'c1ccccc1'] > > Regards, > Eddie > > On Sep 15, 2011, at 3:44 AM, Sarah Langdon wrote: > >> Hi there, >> >> I would like to split up a molecule into a list of rings (each ring >> in the symSSSR), where each ring is stored as a molecular object >> (or SMILES) in the list. >> >> I have found a previous post (http://www.mail-archive.com/rdk...@li.../msg01054.html >> ) which uses Chem.DeleteSubstructs to delete all non-cyclic atoms >> to leave multiple pieces. But I imagine this would leave fused >> rings as one fragment, rather than splitting up the molecule into >> each individual ring. Is there another way to do this which would >> give me each individual ring, or is there a way of splitting fused >> rings into individual rings after using Delete.Substructs? >> >> There is also GetRingInfo, but as far as I can see this only gives >> you size info and atom/bond content of each ring rather than a >> molecular object or SMILES... am I wrong? >> >> Thanks, >> >> Sarah >> >> >> Sarah Langdon >> PhD student >> Cancer Research UK Cancer Therapeutics Unit >> Institute of Cancer Research >> Haddow Laboratories >> 15 Cotswold Road >> Sutton >> Surrey SM2 5NG >> >> Tel: 0208 722 4139 >> Email: sar...@ic... >> >> >> The Institute of Cancer Research: Royal Cancer Hospital, a >> charitable Company Limited by Guarantee, Registered in England >> under Company No. 534147 with its Registered Office at 123 Old >> Brompton Road, London SW7 3RP. >> >> This e-mail message is confidential and for use by the addressee >> only. If the message is received by anyone other than the >> addressee, please return the message to the sender by replying to >> it and then delete the message from your computer and network. >> ------------------------------------------------------------------------------ >> Doing More with Less: The Next Generation Virtual Desktop >> What are the key obstacles that have prevented many mid-market >> businesses >> from deploying virtual desktops? How do next-generation virtual >> desktops >> provide companies an easier-to-deploy, easier-to-manage and more >> affordable >> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/_______________________________________________ >> Rdkit-discuss mailing list >> Rdk...@li... >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. |