Bakary,

I am very new to using python, but I think I have addressed the problem by
adding the following line to "obspectrophores_euclidean" after "import
numpy as np" (without the ==== or the quote marks):

=====
"from get_spectrophore import get_spectrophore"
=====

Is this a valid thing to do? In any event, the script now runs and appears
to be giving correct results.

BTW, I forgot to mention that previously I also got an error about
indentation and I fixed that.

Thanks again for so kindly furnishing the scripts!

Best regards,

Rudy


On Tue, Mar 17, 2020 at 8:56 AM Rudy Richardson <rjr...@umich.edu> wrote:

> Hi Bakary,
>
> The get_spectrophore.py script works for me, but the
> obspectrophores_euclidean.py script does not. I get the following message:
> =====
> Traceback (most recent call last):
>   File "obspectrophores_euclidean.py", line 21, in <module>
>     print(obspectrophores_euclidean(test_ligand, test_ligand)) #should
> return zero
>   File "obspectrophores_euclidean.py", line 9, in obspectrophores_euclidean
>     ligand1_spectrophore = get_spectrophore(ligand1)
> NameError: name 'get_spectrophore' is not defined
> =====
>
> Suggestions welcome! Thanks.
>
> -- Rudy
>
>
>
>
> On Mon, Mar 16, 2020 at 3:11 PM Bakary N'tji Diallo <
> diallobaka...@gmail.com> wrote:
>
>> Sure!
>> That what the obspectrophores_euclidean.py does. It supports sdf with
>> multiple compounds.
>>
>>
>> On Mon, 16 Mar 2020 at 20:06, Rudy Richardson <rjr...@umich.edu> wrote:
>>
>>> Hi Bakary,
>>>
>>> Thanks for the scripts!
>>>
>>> Is there a way to expand upon the Euclidean script to calculate the
>>> distance from a reference ligand spectrophore and N spectrophores from N
>>> different ligands?
>>>
>>> -- Rudy
>>>
>>>
>>> On Mon, Mar 16, 2020 at 1:46 PM Bakary N'tji Diallo <
>>> diallobaka...@gmail.com> wrote:
>>>
>>>>
>>>> If you working in python this should help you.
>>>> I wrote these scripts when using obspectrophores. "get_spectrophore.py"
>>>> will get you a compound spectrophore (tested with sdf but should work with
>>>> other obabel supported format).The second one will compute their euclidean
>>>> distances.
>>>>
>>>>
>>
>> --
>>
>> Bakary N’tji DIALLO
>>
>> PhD Student (Bioinformatics) <http://linkedin.com/in/bakarydiallo>, Research
>> Unit in Bioinformatics (RUBi) <https://rubi.ru.ac.za/>
>>
>> Mail: diallobaka...@gmail.com |  Skype: diallobakary4
>>
>> Tel:  +27798233845 | +223 74 56 57 22 | +223 97 39 77 14
>>
>>
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to