Hi,

here's another one, unfortunately wasn't yet able to figure out a solution:

Once I have the transformation matrix from GetAlignmentTransform, I want to use 
it in TransformMol.

So, when I use it as is, things work. When I calculate the inverse of it  with 
linalg.inv and feed the resulting matrix into TransformMol, nothing happens, 
the coordinates stay the same. No error message either...
When I however, print out the inverse matrix and set it explicitly in the code 
(does not make sense for a real-life script, only for testing) the molecule is 
transformed as desired.

In the attached python code I have demonstrated this by using a translation in 
x-direction by 0.5 A.
Explicitly declaring the inverse transformation (ie. Translation by -0.5A) and 
applying it works, feeding the calculated inverse matrix into TransformMol 
results in unchanged atomic positions.

And again, printing out the arrays (and checking the types!) I don't see any 
difference...

Thanks for any help,
Th.

Mit freundlichen Grüßen / Kind regards,
Dr. Thomas Fox

Boehringer Ingelheim Pharma GmbH & Co. KG
Medicinal Chemistry
Tel.: +49 (7351) 54-7585
Fax: +49 (7351) 83-7585
mailto:thomas....@boehringer-ingelheim.com<mailto:%7bemail%7d>


Pflichtangaben finden Sie unter: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland
Mandatory information can be found at: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland

Diese E-Mail ist vertraulich zu behandeln. Sie kann besonderem rechtlichem 
Schutz unterliegen. Wenn Sie nicht der richtige Adressat sind, senden Sie bitte 
diese E-Mail an den Absender zurück, löschen die eingegangene E-Mail und geben 
den Inhalt der E-Mail nicht weiter. Jegliche unbefugte Bearbeitung, Nutzung, 
Vervielfältigung oder Verbreitung ist verboten. / This e-mail is confidential 
and may also be legally privileged. If you are not the intended recipient 
please reply to sender, delete the e-mail and do not disclose its contents to 
any person. Any unauthorized review, use, disclosure, copying or distribution 
is strictly prohibited.
Von: Greg Landrum [mailto:greg.land...@gmail.com]
Gesendet: Dienstag, 17. Oktober 2017 12:40
An: Fox,Dr.,Thomas (RES MedChem) BIP-DE-B; rdkit-discuss@lists.sourceforge.net
Betreff: Re: [Rdkit-discuss] GetAlignmentTransform

I'm glad you were able to track that down, it's an interesting one.

I'll have to look, but we may be able to fix that on the C++ side.

________________________________
From: 
thomas....@boehringer-ingelheim.com<mailto:thomas....@boehringer-ingelheim.com> 
<thomas....@boehringer-ingelheim.com<mailto:thomas....@boehringer-ingelheim.com>>
Sent: Tuesday, October 17, 2017 2:27:39 AM
To: 
rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>
Subject: Re: [Rdkit-discuss] GetAlignmentTransform

Ok, mystery solved...argsort returns (at least on my Linux box) an int64, which 
GetAlignmentTransform obviously cant handle.

Best,
Th.

Mit freundlichen Grüßen / Kind regards,
Dr. Thomas Fox

Boehringer Ingelheim Pharma GmbH & Co. KG
Medicinal Chemistry
Tel.: +49 (7351) 54-7585
Fax: +49 (7351) 83-7585
mailto:thomas....@boehringer-ingelheim.com<mailto:%7bemail%7d>


Pflichtangaben finden Sie unter: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland
Mandatory information can be found at: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland

Diese E-Mail ist vertraulich zu behandeln. Sie kann besonderem rechtlichem 
Schutz unterliegen. Wenn Sie nicht der richtige Adressat sind, senden Sie bitte 
diese E-Mail an den Absender zurück, löschen die eingegangene E-Mail und geben 
den Inhalt der E-Mail nicht weiter. Jegliche unbefugte Bearbeitung, Nutzung, 
Vervielfältigung oder Verbreitung ist verboten. / This e-mail is confidential 
and may also be legally privileged. If you are not the intended recipient 
please reply to sender, delete the e-mail and do not disclose its contents to 
any person. Any unauthorized review, use, disclosure, copying or distribution 
is strictly prohibited.
Von: 
thomas....@boehringer-ingelheim.com<mailto:thomas....@boehringer-ingelheim.com> 
[mailto:thomas....@boehringer-ingelheim.com]
Gesendet: Montag, 16. Oktober 2017 16:40
An: 
rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>
Betreff: [Rdkit-discuss] GetAlignmentTransform

Hi,
I have a weird problem with the GetAlignmentTransform function when using the 
atomMap argument. Depending how I create the underlying tuples and pass them 
via zip into the function call, I do get back the transformation matrix or the 
error message "cannot extract desired type from sequence".

As you can see in the attached python code snippet, I either collect the atom 
mappings (= atom ids) from  the distance matrix and argsort, by generating two 
lists and transforming them into two tuples, or by explicitly setting the 
tuples. Then I use zip to generate the mappings.
In the latter two cases, things work fine, in the first case they don't. To me, 
the tuples and the list(zip()) look identical, so I do not have an idea why 
GetAlignmentTransform throws up.

I have attached two molecule files (essentially benzene and pyridine), the 
python code test.py and the output test.out

I would be very grateful if anybody could shed some light on this and explain 
what I do wrong.

Best,
Th.


Mit freundlichen Grüßen / Kind regards,
Dr. Thomas Fox

Boehringer Ingelheim Pharma GmbH & Co. KG
Medicinal Chemistry
Tel.: +49 (7351) 54-7585
Fax: +49 (7351) 83-7585
mailto:thomas....@boehringer-ingelheim.com<mailto:%7bemail%7d>


Pflichtangaben finden Sie unter: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland
Mandatory information can be found at: 
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland

Diese E-Mail ist vertraulich zu behandeln. Sie kann besonderem rechtlichem 
Schutz unterliegen. Wenn Sie nicht der richtige Adressat sind, senden Sie bitte 
diese E-Mail an den Absender zurück, löschen die eingegangene E-Mail und geben 
den Inhalt der E-Mail nicht weiter. Jegliche unbefugte Bearbeitung, Nutzung, 
Vervielfältigung oder Verbreitung ist verboten. / This e-mail is confidential 
and may also be legally privileged. If you are not the intended recipient 
please reply to sender, delete the e-mail and do not disclose its contents to 
any person. Any unauthorized review, use, disclosure, copying or distribution 
is strictly prohibited.

Attachment: test.py
Description: test.py

Attachment: BHo.mol2
Description: BHo.mol2

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to