[Rdkit-discuss] Swapping bonds in a 3D mol

2020-05-31 Thread Tim Dudgeon
What is the best way to swap 2 bonds that are attached to an atom without changing the 3D coordinates of the other atoms. As an example, I have a tetrahedral carbon with bonds 1, 2, 3 and 4. I want to switch bonds 1 and 2, including relocating any atoms attached to the other atom in those bonds,

Re: [Rdkit-discuss] IsBondRotatable() ?

2020-06-01 Thread Tim Dudgeon
mations/blob/4f3c5ef47f66708defc64196c94e427a956b8f15/get_conformations.py#L16 > > On 30 May 2020, at 13.38, Tim Dudgeon wrote: > > Is there an easy way to ask whether a particular bond is rotatable? > ___ > Rdkit-discuss mailing list > Rd

[Rdkit-discuss] Chiral flag when writing molfile

2020-07-13 Thread Tim Dudgeon
I've noticed that when writing a 3D molfile that has been generated by RDKit (in my case using AllChem.EmbedMolecule) and has chirality present that the chiral flag is not set. At least it is not always set, I can't be exactly sure. My exact scenario is to read a chiral SMILES, convert to 3D using

Re: [Rdkit-discuss] Chiral flag when writing molfile

2020-07-14 Thread Tim Dudgeon
> > The code behaves this way because otherwise it would need to guess what > the user intended (as well as how they interpret/use the chiral flag). > > -greg > > > On Mon, Jul 13, 2020 at 1:28 PM Tim Dudgeon wrote: > >> I've noticed that when writing a 3D molfile th

[Rdkit-discuss] Adjusting weight when merging feature maps

2020-07-23 Thread Tim Dudgeon
The points in a featuremap seem to have a 'weight' property that is set to 1.0 as default. When merging featuremaps with the CombineFeatMaps() the weight of the merged points remains as 1.0. Is it possible to change this behaviour so that the meged point has an increased weight? Either a weight

Re: [Rdkit-discuss] Build matching 3D structure

2020-07-28 Thread Tim Dudgeon
ConstrainedEmbed should be what you need. If it's saying that your molecule doesn't match the core then that's where you need to look. Maybe the core is not an exact substructure? If you still have difficulties you could generate the MCS between the structures and use that as the core. Greg's blog

[Rdkit-discuss] Saving FeatMap

2020-07-21 Thread Tim Dudgeon
I'm needing to save a FeatMap to a file so that I can load it back later. I've been using a pickle for this, but am now told that this will not be permitted for security reasons. Is there a better way to do this? Thanks Tim ___ Rdkit-discuss mailing list

[Rdkit-discuss] Handling PDB files

2020-07-23 Thread Tim Dudgeon
RDKit can read PDB files but is there any functionality to work with the resulting molecule at the chain and residue level? ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

[Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-01-12 Thread Tim Dudgeon
I'm struggling to work out a stange core dump I'm getting when calculating Morgan fingerprints from Java. This seems to happen with the Release_2020_09 releases but not with the Release_2019_09 ones. It does not happen when calculating RDKit fingerprints. The exact Java code involved is:

[Rdkit-discuss] MaxMin picker for picking the most similar molecules

2021-02-04 Thread Tim Dudgeon
I'm wanting to pick the molecules in one set that are most similar to those in a seed set. Seems like I should be able to use the MaxMinPicker to do this by using a function of (1 - tanimoto). Would this work, or is there a better approach? Thanks Tim

Re: [Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-02-02 Thread Tim Dudgeon
Wondering if anyone had any thoughts on this core dump from Java. What other info would be useful? Tim On Tue, Jan 12, 2021 at 12:55 PM Tim Dudgeon wrote: > I'm struggling to work out a stange core dump I'm getting when calculating > Morgan fingerprints from Java. This seems to

Re: [Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-02-03 Thread Tim Dudgeon
already tried, but it's worth checking > anyway: can you force your web app to only run a single thread at a time? > That shouldn't be a problem with the morgan fingerprinting code, but it's > still worth the experiment. > > -greg > > > On Tue, Feb 2, 2021 at 7:14 P

Re: [Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-02-03 Thread Tim Dudgeon
>>> parsers? Have they been sanitized? >>> >>> Another thing you might have already tried, but it's worth checking >>> anyway: can you force your web app to only run a single thread at a time? >>> That shouldn't be a problem with the morgan fingerprinting co

[Rdkit-discuss] validating stereochemistry

2021-09-27 Thread Tim Dudgeon
I have Python code to enumerate undefined chiral centres in a molecule. Mostly this works fine, but for some constrained structures this can generate stereochemistry that makes no sense. For instance consider NC1CC2CCC1C2: [image: #1 (2).png] These two make sense: [image: #2.png] [image: #3.png]

Re: [Rdkit-discuss] validating stereochemistry

2021-09-27 Thread Tim Dudgeon
le. > > -Brian > > > On Sep 27, 2021, at 8:06 AM, Tim Dudgeon wrote: > >  > I have Python code to enumerate undefined chiral centres in a molecule. > Mostly this works fine, but for some constrained structures this can > generate stereochemistry that makes no s

[Rdkit-discuss] Problems building from source

2021-12-20 Thread Tim Dudgeon
I'm hitting problems when building from source on an Ubuntu system. I've installed the dependencies (e.g. boost) using apt and think I have everything set properly, but cmake is failing. Early on it says: -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found

[Rdkit-discuss] Detecting non-discrete molecules

2021-12-18 Thread Tim Dudgeon
I've found that a source of molecules that I use now has some smiles that contain the * character, whereas earlier versions did not. This is now causing downstream problems. Whilst it would be pretty simple to check the smiles for * characters I think there should be a more general solution here

[Rdkit-discuss] State of the art for shape alignment

2021-11-11 Thread Tim Dudgeon
I'm looking into the current status of techniques that use RDKit to perform 3D alignments based on shape (e.g. not using AlignMol()) and struggling to find what the best tools are and the status of each. The Open3D align tools are relatively straightforward to use, but in my hands do not seem to

[Rdkit-discuss] InsertMol() seems to mess up the molecule

2021-10-25 Thread Tim Dudgeon
I'm trying to merge two molecules into one, and it looks like the InsertMol() function is supposed to do this. But when I try the merged molecule is messed up. [image: image.png] Am I doing the right thing? Thanks Tim ___ Rdkit-discuss mailing list

Re: [Rdkit-discuss] InsertMol() seems to mess up the molecule

2021-10-25 Thread Tim Dudgeon
and > only sanitize at the end of the insertion process. > > Cheers, > p. > > On Mon, Oct 25, 2021 at 1:15 PM Tim Dudgeon wrote: > >> I'm trying to merge two molecules into one, and it looks like the >> InsertMol() function is supposed to do this. But when I try the

[Rdkit-discuss] Reading text records from SDF from gzipped files

2021-11-04 Thread Tim Dudgeon
I am needing to access the text of each record of a SDF, as well as creating a mol instance. I was successfully doing this using SDMolSupplier.GetItemText(). Then I needed to switch to handling gzipped SD files, and SDMolSupplier can only take a file name in its constructor. ForwardSDMolSupplier

Re: [Rdkit-discuss] Removing Hs bonded to sp3 carbons

2021-10-23 Thread Tim Dudgeon
Chem.RemoveHs(mol) will remove all Hs. Do you really want to only remove them from sp3 carbons? On Tue, Oct 19, 2021 at 7:08 PM Alfredo Quevedo wrote: > Dear all, > > I am trying to figure out if there is a way to remove all hydrogens bond > to sp3 carbons in my molecule? > > thanks in advance

[Rdkit-discuss] Swig versions

2021-12-05 Thread Tim Dudgeon
I'm having problems building with Debian bullseye release. Bullseye now has swig4.0, but RDKit build seems to require exactly 3.0. Error is: CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find SWIG: Found unsuitable version "4.0.2", but

Re: [Rdkit-discuss] Problems minimising

2021-12-14 Thread Tim Dudgeon
Worked it out for myself. I needed to use: Chem.AddHs(mol, addCoords=True) Doh! On Tue, Dec 14, 2021 at 5:45 PM Tim Dudgeon wrote: > I'm seeing lots of failures when minimising molecules using > MMFFOptimizeMolecule. > A large proportion of seemingly valid molecules seem to fail. >

[Rdkit-discuss] Problems minimising

2021-12-14 Thread Tim Dudgeon
I'm seeing lots of failures when minimising molecules using MMFFOptimizeMolecule. A large proportion of seemingly valid molecules seem to fail. Am I doing something stupid here? Example: from rdkit import Chem from rdkit.Chem import AllChem molblock = ''' RDKit 3D 5 4 0 0 0

Re: [Rdkit-discuss] Using SmilesMolSuplier with CSV containing quotemarks

2022-01-10 Thread Tim Dudgeon
I think you have to add a step that removes the quote marks if they are present? Tim On Mon, Jan 10, 2022 at 10:15 AM James Wallace wrote: > As the subject suggests, I'm trying to find a universal solution for > reading CSVs via the SmilesMolSupplier (as the input setup could be single > column

Re: [Rdkit-discuss] JS funtionality

2022-03-04 Thread Tim Dudgeon
e's support for visualizing molecules from SMILES and CTAB, but > currently no support for SDF properties out of the box. > > Cheers, > p. > > On Thu, Mar 3, 2022 at 6:31 PM Tim Dudgeon wrote: > >> Is there a full list of the RDKit functionality that is available from &g

[Rdkit-discuss] JS funtionality

2022-03-03 Thread Tim Dudgeon
Is there a full list of the RDKit functionality that is available from the JavaScript bindings ( https://github.com/rdkit/rdkit/tree/master/Code/MinimalLib)? Maybe I'm missing the obvious, but I can only find the examples e.g.

Re: [Rdkit-discuss] Delete atoms can leave dangling aromaticity

2022-02-14 Thread Tim Dudgeon
e the molecule and clear aromatic > flags before starting to remove atoms, then sanitize: > > rwmol = Chem.RWMol(Chem.MolFromSmiles("c1c1")) > Chem.Kekulize(rwmol, clearAromaticFlags=True) > rwmol.RemoveAtom(0) > > Chem.SanitizeMol(rwmol) > rdkit.Chem.rdmolops.Sa

[Rdkit-discuss] Delete atoms can leave dangling aromaticity

2022-02-14 Thread Tim Dudgeon
I'm using mol.RemoveAtom(atom) to remove atoms from a molecule, and then calling Chem.SanitizeMol(mol) at the end to clean up the molecule. Mostly this works fine. But when I delete atoms in an aromatic ring but leave a single ring atom remaining in the molecule then the sanitize function fails:

Re: [Rdkit-discuss] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
; > On Fri, Feb 11, 2022 at 3:49 PM Tim Dudgeon wrote: > >> Hi Greg, >> yes, but my situation is that the X dimension is much larger than the Y >> and most of the time things are aligned nicely. But not always. Here is an >> example. >> OC(C(=O)NC=1C=CC=

Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
ch, among other things, > addresses exactly the need that you describe through the baseFontSize > parameter, which is currently not exposed to Python. The PR is almost ready > for merging and it should become part of the March release. > > Cheers, > p. > > On Wed, Feb 9, 20

[Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
I'm confused over how the font is chosen when drawing molecules. There are MolDrawOptions.minFontSize and MolDrawOptions.maxFontSize properties, and if I set them to the same value then that sized font is used. But if I set max to a larger size than min then it's not clear what font size will be

Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
e > default.") > ``` > to $RDBASE/Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp immediately after > the analogous minFontSize entry > HTH, > Dave > > > > On Wed, Feb 9, 2022 at 10:31 AM Tim Dudgeon wrote: > >> OK, thanks. That's great to hear. &g

[Rdkit-discuss] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
At Dave Cosgrove's suggestion I raise this as a new topic, though it was touched on briefly recently. I'd like to know if it's possible to depict a molecule in a way that takes into account the dimensions of the box it will appear in. In my case I have a rectangle that is short and wide (aspect

Re: [Rdkit-discuss] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
.com/greglandrum/12b793b240d27e3c0899c9c6c62d4f30 > > -greg > > > On Fri, Feb 11, 2022 at 10:20 AM Tim Dudgeon > wrote: > >> At Dave Cosgrove's suggestion I raise this as a new topic, though it was >> touched on briefly recently. >> >> I'd like to know if it

[Rdkit-discuss] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
I'm building RDKit from the latest code on the master branch. The build is fine, but the python bindings seem broken: >>> from rdkit import Chem Traceback (most recent call last): File "", line 1, in File "/data/github/rdkit/rdkit/rdkit/__init__.py", line 6, in from . import rdBase

Re: [Rdkit-discuss] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
And to clarify, the build completes OK. It's just that the Python bindings don't work. On Wed, Jan 26, 2022 at 2:42 PM Tim Dudgeon wrote: > Yes, it sounds similar, but I'm not applying that fix (though on the > Release_2021_09_4 tag I do also see that same problem). > I'm just doin

Re: [Rdkit-discuss] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
lds > fine for me too. > > Cheers, > p. > > On Wed, Jan 26, 2022 at 2:58 PM Tim Dudgeon wrote: > >> I'm building RDKit from the latest code on the master branch. >> The build is fine, but the python bindings seem broken: >> >> >>> from rdki

<    1   2