Re: [Rdkit-discuss] RMSD value between two non-covalent molecular complexes

2017-06-22 Thread gosia olejniczak
Hi again,

i found where the problem was (it seems):

as i was reading in molecules from sdf file through "SDMolSupplier" by
doing:

suppl = Chem.SDMolSupplier(filename)

the hydrogen atoms were removed (what was not obvious since e.g.
GetNumAtoms with "heavy" flag was returning the total number of atoms -
including hydrogens, but none of the functions like "GetAtomIdx" etc. was
seeing hydrogens - i looked in the code, maybe it is because in the
"Code/GraphMol/ROMol.cpp" in all such functions the "GetNumAtoms" and not
"GetNumHeavyAtoms" is called?)

then i guess that it must have messed up something somewhere, so that
instead of seeing "x+h2o" the code did as if there was only "x" on a file

but if i read in the molecules as:
suppl = Chem.SDMolSupplier(filename, removeHs=False)

then all seems to be ok (rmsd values seem to include h2o; also h2o are
drawn with py3Dmol);

best regards,
gosia



2017-06-21 16:37 GMT+02:00 gosia olejniczak <gosia.olejnic...@gmail.com>:

> Hi Paolo,
>
> Thank you for the prompt answer!
>
> i'll try it out, but:
> - the whole complex "X+h2o" is read from one sdf file
> - Chem.Mol.GetNumAtoms gives the correct number of atoms (= it includes
> h2o) [*]
>
> so i'm wondering what is the best way to specify two fragments "x" and
> "h2o", so that i could use them as arguments to CombineMols()?
> does it make sense to:
> 1. search for h2o pattern in "x+h2o" (GetSubstructMatch)
> 2. remove h2o from the "x+h2o" complex (DeleteSubstruct) and get only "x"
> -> save it
> 3. remove x from the "x+h2o" complex (DeleteSubstruct) and get only "h2o"
> -> save it
> 4. then finally use CombineMols() with separate fragments from 2. and 3.?
> that seems a bit silly, maybe there is a simpler way?
>
> thank you!
> all the best,
> gosia
>
> [*] still, the plot of its 3D structure drawn with py3Dmol only shows "x"
> and not "x+h2o"...
>
> 2017-06-21 16:01 GMT+02:00 Paolo Tosco <paolo.to...@unito.it>:
>
>> Hi Gosia,
>>
>> you may want to look at the CombineMols() function in the rdmolops
>> module. If you make a single molecule out of the two fragments, then you
>> should manage to get what you are looking for.
>>
>> Cheers,
>> p.
>>
>>
>> On 06/21/17 14:47, gosia olejniczak wrote:
>>
>> dear RDKit experts,
>>
>> is it possible to calculate RMSD value between two non-covalent molecular
>> complexes?
>>
>> For instance:
>> complex1: X(conformer1) + H2O
>> complex2: X(conformer2) + H2O
>>
>> i tried GetBestRMS and GetO3A.Align but the program clearly neglects H2O
>> and calculates the RMSD only between X(conformer1) and X(conformer2)
>>
>> thank you!
>> best regards,
>> gosia
>>
>>
>> --
>> 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 
>> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>>
>> 
>> --
>> 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
>>
>>
>
--
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


[Rdkit-discuss] RMSD value between two non-covalent molecular complexes

2017-06-21 Thread gosia olejniczak
dear RDKit experts,

is it possible to calculate RMSD value between two non-covalent molecular
complexes?

For instance:
complex1: X(conformer1) + H2O
complex2: X(conformer2) + H2O

i tried GetBestRMS and GetO3A.Align but the program clearly neglects H2O
and calculates the RMSD only between X(conformer1) and X(conformer2)

thank you!
best regards,
gosia
--
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


[Rdkit-discuss] starting 3D structures in conformer generation

2017-06-13 Thread gosia olejniczak
dear RDKit experts,

i have a question about conformer generation, maybe best posed on an
example:

i'm working with macrocycles which have few amide groups. As in each amide
group H(-N) and O(=C) atoms can have two positions with respect to a rigid
part of a molecule (amide groups are direct neighbours of aromatic rings) -
"syn" and "anti" - one can think of few families of conformers: "syn syn
syn...", "syn syn anti...", "syn anti anti...", etc.

i would like to generate a set which would have representatives of all/most
of these families;
for that:
1. i started with constructing 3D structures of all representatives
manually (i.e. starting from the crystal structure, manipulating atoms in
all amide groups and pre-optimizing with MM in Avogadro just to have a set
of candidates representing all orientation families mentioned above)
2. then used AllChem.EmbedMultipleConfs with all the 3D structures
generated in step 1 as initial geometries, followed by MM optimization with
AllChem.UFFOptimizeMolecule

But as explained in
http://pubs.acs.org/doi/abs/10.1021/acs.jcim.5b00654
the program starts with creating the "distance bound matrix" based on
empirical information including "ideal bond lengths, ideal bond angles, and
a few ideal torsion angles", therefore i'm wondering whether what i do
makes sense: does it matter with which conformer ("syn syn...", "syn
anti..." etc.) i start if anyway for all the conformers of the same
molecule the distance bound matrix would be the same? is that correct?

If that is indeed the case (= it does not matter with which 3D structure i
start), what would be your advice to assure that all orientation types
("syn syn...", "syn anti..." etc.) are in a final set?
Since there is a random distance matrix generation step, would you simply
repeat AllChem.EmbedMultipleConfs many times until you see all structures
you want to have in a set?
Or is there a smarter way to do it?

Thank you and best regards,
gosia
--
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


Re: [Rdkit-discuss] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
thank you!
best regards,
gosia

2017-03-28 16:12 GMT+02:00 Greg Landrum <greg.land...@gmail.com>:

> Ah got it. I think this is a 3dmol.js/py3dmol question, not an RDKit
> question.
> I'd suggest asking on the 3dmol.js issue tracker: https://github.com/
> 3dmol/3Dmol.js/issues
>
> On Tue, Mar 28, 2017 at 4:06 PM, gosia olejniczak <
> gosia.olejnic...@gmail.com> wrote:
>
>> dear Greg,
>>
>> thank you for your prompt response,
>> yes, that notebook works just fine,
>> however if i try to call py3Dmol.view() many more times, only few windows
>> appear (and they disappear as i scroll down to run cells below), example:
>>
>> http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blo
>> b/master/notes_m1.ipynb
>>
>> best regards,
>> gosia
>>
>>
>> 2017-03-28 16:02 GMT+02:00 Greg Landrum <greg.land...@gmail.com>:
>>
>>> I may not have understood the question correctly: when I open that page
>>> all frames are active.
>>>
>>> On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
>>> gosia.olejnic...@gmail.com> wrote:
>>>
>>>> hello,
>>>>
>>>> i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
>>>> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
>>>> ob/master/notebooks/Trying%20py3Dmol.ipynb
>>>>
>>>> is there a limit of how many py3Dmol.view() frames can be in one
>>>> notebook?
>>>> i'm asking because it seems that jupyter notebook can handle only a
>>>> limited number of these: with running all cells, even one-by-one, only the
>>>> last few frames are visible and the view of the first ones disappear,
>>>> restarting does not help.
>>>>
>>>> can that be changed somewhere?
>>>> thank you and best regards,
>>>> gosia
>>>>
>>>> 
>>>> --
>>>> 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
>>>>
>>>>
>>>
>>
>
--
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


Re: [Rdkit-discuss] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
dear Greg,

thank you for your prompt response,
yes, that notebook works just fine,
however if i try to call py3Dmol.view() many more times, only few windows
appear (and they disappear as i scroll down to run cells below), example:

http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blob/master/notes_m1.ipynb

best regards,
gosia


2017-03-28 16:02 GMT+02:00 Greg Landrum <greg.land...@gmail.com>:

> I may not have understood the question correctly: when I open that page
> all frames are active.
>
> On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
> gosia.olejnic...@gmail.com> wrote:
>
>> hello,
>>
>> i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
>> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
>> ob/master/notebooks/Trying%20py3Dmol.ipynb
>>
>> is there a limit of how many py3Dmol.view() frames can be in one notebook?
>> i'm asking because it seems that jupyter notebook can handle only a
>> limited number of these: with running all cells, even one-by-one, only the
>> last few frames are visible and the view of the first ones disappear,
>> restarting does not help.
>>
>> can that be changed somewhere?
>> thank you and best regards,
>> gosia
>>
>> 
>> --
>> 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
>>
>>
>
--
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


[Rdkit-discuss] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
hello,

i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
ob/master/notebooks/Trying%20py3Dmol.ipynb

is there a limit of how many py3Dmol.view() frames can be in one notebook?
i'm asking because it seems that jupyter notebook can handle only a limited
number of these: with running all cells, even one-by-one, only the last few
frames are visible and the view of the first ones disappear, restarting
does not help.

can that be changed somewhere?
thank you and best regards,
gosia
--
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


[Rdkit-discuss] problems with alignment (py3Dmol + rdkit, jupyter notebook)

2017-03-28 Thread gosia olejniczak
dear all

i am trying to align molecules read from a *sdf file (list of conformers)
against another molecule (reference - a crystal structure), also read from
a *sdf file and make a nice 3d picture in jupyter notebook as shown in:
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/
blob/master/notebooks/Trying%20py3Dmol.ipynb

i can reproduce all that happens in that notebook, but if i try to read
molecules from *sdf files, "AllChem.AlignMolConformers" fails

a simple example is here:
http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blob/master/wrong_alignment.ipynb


the same thing happens if i generate a list of conformers with rdkit "on
the fly" (example in that notebook also),

in addition i found few difficulties:
- how to write "ConfToMolBlock" - like method - right now i'm writing all
conformers to sdf file and reading them in again as mol
- now i'm using a very small molecule fragment ("core") which i want to be
most-aligned among all molecules - from an example notebook (
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/
blob/master/notebooks/Trying%20py3Dmol.ipynb) this works very well, but not
for my molecule. why is that and how can i fix that?

thank you for any tips!
best regards,
gosia
--
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