Ahh apologise, I misunderstood the question! I thought it seemed a bit simple!
Best,
Nick
Nicholas C. Firth | PhD Student | Cancer Therapeutics
The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey
| SM2 5NG
T 020 8722 4033 | E [email protected]<mailto:[email protected]> |
W www.icr.ac.uk<http://www.icr.ac.uk/> | Twitter
@ICRnews<https://twitter.com/ICRnews>
Facebook
www.facebook.com/theinstituteofcancerresearch<http://www.facebook.com/theinstituteofcancerresearch>
Making the discoveries that defeat cancer
[cid:[email protected]]
On 21 Apr 2015, at 18:08, James Davidson
<[email protected]<mailto:[email protected]>> wrote:
Hi Nick,
Well on the plus side I don't get a segfault(!)
On the minus side - unfortunately I think this approach only gives the length
of the shortest path, rather than a list of the atom ids in the shortest path.
Kind regards
James
-----Original Message-----
From: Nicholas Firth [mailto:[email protected]<http://icr.ac.uk>]
Sent: 21 April 2015 17:44
To: James Davidson;
[email protected]<mailto:[email protected]>
Subject: RE: Python GetShortestPath()?
Dear James,
I tried to be helpful and show you how I do it with GetAdjacencyMatrix,
however I ran into my old friend the segmentation fault 11 as there is still
some weird error with this function.
Here's what I have though, should work for you.
from rdkit import Chem
m =
Chem.MolFromSmiles('CC[C@H](CO)NC1=NC(=C2C(=N1)N(C=N2)C(C)C)NCC
3=CC=
CC=C3')
atomIdx1 = 0
atomIdx2 = 10
print(Chem.GetAdjacencyMatrix(m)[atomIdx1][atomIdx2])
Segmentation fault: 11
Best,
Nick
Nicholas C. Firth | PhD Student | Cancer Therapeutics The Institute of Cancer
Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NG T 020
8722 4033 | E [email protected]<mailto:[email protected]> | W
www.icr.ac.uk<http://www.icr.ac.uk> | Twitter @ICRnews
________________________________________
From: James Davidson [[email protected]<mailto:[email protected]>]
Sent: 21 April 2015 17:06
To:
[email protected]<mailto:[email protected]>
Subject: [Rdkit-discuss] Python GetShortestPath()?
Dear All,
I might be having a 'moment' here, but for the life of me I can't seem to find
the equivalent of RDKit::MolOps::getShortestPath exposed in python(?).
I want to pass in two atom ids, and get back a list of atom ids in the shortest
path. I could possibly try to roll my own by using GetDistanceMatrix() and
GetAdjacencyMatrix(), but I think I may struggle(!).
So, any pointer to GetShortestPath() greatly appreciated!
Kind regards
James
__________________________________________________________
____________
PLEASE READ: This email is confidential and may be privileged. It is intended
for the named addressee(s) only and access to it by anyone else is
unauthorised. If you are not an addressee, any disclosure or copying of the
contents of this email or any action taken (or not taken) in reliance on it is
unauthorised and may be unlawful. If you have received this email in error,
please notify the sender or
[email protected]<mailto:[email protected]>. Email is not a secure
method of communication and the Company cannot accept responsibility for
the accuracy or completeness of this message or any attachment(s). Please
check this email for virus infection for which the Company accepts no
responsibility. If verification of this email is sought then please request a
hard
copy. Unless otherwise stated, any views or opinions presented are solely
those of the author and do not represent those of the Company.
The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 0000
To access trading company registration and address details, please go to the
Vernalis website at www.vernalis.com<http://www.vernalis.com> and click on the
"Company address
and registration details" link at the bottom of the page..
__________________________________________________________
____________
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.
______________________________________________________________________
PLEASE READ: This email is confidential and may be privileged. It is intended
for the named addressee(s) only and access to it by anyone else is
unauthorised. If you are not an addressee, any disclosure or copying of the
contents of this email or any action taken (or not taken) in reliance on it is
unauthorised and may be unlawful. If you have received this email in error,
please notify the sender or
[email protected]<mailto:[email protected]>. Email is not a secure
method of communication and the Company cannot accept responsibility for the
accuracy or completeness of this message or any attachment(s). Please check
this email for virus infection for which the Company accepts no responsibility.
If verification of this email is sought then please request a hard copy. Unless
otherwise stated, any views or opinions presented are solely those of the
author and do not represent those of the Company.
The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 0000
To access trading company registration and address details, please go to the
Vernalis website at www.vernalis.com<http://www.vernalis.com> and click on the
"Company address and registration details" link at the bottom of the page..
______________________________________________________________________
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Rdkit-discuss mailing list
[email protected]<mailto:[email protected]>
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.------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss