[Rdkit-discuss] Count-based fingerprints of molecules with and without starred atoms

2021-09-19 Thread Gianmarco Ghiandoni
I have a question for the RDKit community that regards count-based RDKit fingerprints. During a test, I have noticed that the compound *C1C1 has a similarity (Euclidean) different than 1 against either [H]C1C1 or C1C1. So, I am wondering, how does RDKit encode starred atoms? I thought

Re: [Rdkit-discuss] Hiding/removing specific atoms in a RDKit molecule

2021-12-03 Thread Gianmarco Ghiandoni
Bond(bidx, eidx) > for atom_idx in sorted(ai_to_remove, reverse=True): > rwmol.RemoveAtom(atom_idx) > Chem.SanitizeMol(rwmol) > return rwmol.GetMol() > remove_selected_hs(mol_h, hs_to_remove) > [image: image.png] > Cheers, > p. > > On Thu, Dec 2, 2021

[Rdkit-discuss] Hiding/removing specific atoms in a RDKit molecule

2021-12-02 Thread Gianmarco Ghiandoni
Hi all, I have been working on a library that computes properties for molecules where hydrogens are explicit. These properties are then saved into a dictionary where keys are indices, then I am using the dictionary to depict these properties on their corresponding hydrogens - also according to

Re: [Rdkit-discuss] Reading an SDF/Mol without shuffling the original coordinates

2022-01-13 Thread Gianmarco Ghiandoni
> set of new coordinates for your molecule. > > I hope I interpreted your needs correctly! > > Cheers, > p. > > > On Thu, Jan 13, 2022 at 2:05 PM Gianmarco Ghiandoni > wrote: > >> Hi all, >> >> Quick question: I have noticed that when I read a

[Rdkit-discuss] Reading an SDF/Mol without shuffling the original coordinates

2022-01-13 Thread Gianmarco Ghiandoni
Hi all, Quick question: I have noticed that when I read a compound from an SDF/Mol file where all coordinates are already defined, the embedding process changes the conformation of the RDKit mol object, hence coordinates are not preserved: import rdkit cdk2_path = os.path.join(data_path,

Re: [Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
rdkit.org/docs/cppapi/structRDKit_1_1MolDrawOptions.html#a6cf64fa7c9f2c08870914430f6a46282> > > e.g. > IPythonConsole.drawOptions.annotationFontScale = 0.7 > > The default scale is 0.5. > > Cheers, > p. > > > On Mon, Mar 28, 2022 at 2:31 PM Gianmarco Ghian

Re: [Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
ue > d2d.DrawMolecule(Chem.MolFromSmiles("c1n1")) > d2d.FinishDrawing() > SVG(d2d.GetDrawingText()) > [image: image.png] > > Cheers, > p. > > On Mon, Mar 28, 2022 at 5:03 PM Gianmarco Ghiandoni > wrote: > >> Hello Paolo, >> >> Thanks for

[Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
Hi all, I am using RDKit to set calculated values to atoms as shown below and I would like to know whether it is possible or not to change the font size to make it slightly bigger. # For each atom, set the property "atomNote" to a index+1 of the atom atom.SetProp("atomNote",

[Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Gianmarco Ghiandoni
Hi all, I am writing a function that removes atoms with only one bond and can be applied recursively in order to find the scaffold of a molecule. The function works in most cases but I have observed that, when aromatic rings are involved, it produces a loss of information. This is an example:

Re: [Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Gianmarco Ghiandoni
> > rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE > > rwmol > > [image: image.png] > > Using Chem.RWMol as a context manager will allow you commit the changes > only when you are done, so you won't invalidate atom and bond iterators > along the way. > > Cheers, >

Re: [Rdkit-discuss] Adjusting/neutralising the formal charges on a molecule

2022-04-09 Thread Gianmarco Ghiandoni
ze import rdMolStandardize > > uc = rdMolStandardize.Uncharger() > > Chem.MolToSmiles(uc.uncharge(Chem.MolFromSmiles("[CH+]1C2C2CC2C12"))) > > 'C1CCC2CC3C3CC2C1' > > > Cheers, > p. > > > On Fri, Apr 8, 2022 at 4:16 PM Gianmarco Ghi

[Rdkit-discuss] RegistrationHash in C++/Java

2023-09-07 Thread Gianmarco Ghiandoni
Hello all, I've been testing the Python module from rdkit.Chem import RegistrationHash for some time now and I would like to use it in Java too. I browsed the RDKit repository but I could not find it implemented in C++, and therefore, not available in the Java JARs. Am I missing it from

Re: [Rdkit-discuss] RegistrationHash in C++/Java

2023-09-07 Thread Gianmarco Ghiandoni
t regards, > -greg > > > On Thu, Sep 7, 2023 at 1:17 PM Gianmarco Ghiandoni > wrote: > >> Hello all, >> >> I've been testing the Python module from rdkit.Chem import >> RegistrationHash for some time now and I would like to use it in Java >> too.

[Rdkit-discuss] Adjusting/neutralising the formal charges on a molecule

2022-04-08 Thread Gianmarco Ghiandoni
Hi all again, I wonder whether there is a way in RDKit to neutralise the charges of compounds such as "[C+]1C2C2CC2C12". Specifically, in my case I am dealing with only carbon sequences. Thanks, -- *Gianmarco* ___ Rdkit-discuss mailing list

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-06 Thread Gianmarco Ghiandoni
empty space around the > molecule (the default is 0.05, and it's the fraction of the width/height of > the image) such that there's enough room to show the whole annotation. > It's a bit of a kludge, but it might work. > > Dave > > On Wed, May 4, 2022 at 4:20 PM Gianmarco Ghiandoni

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-07 Thread Gianmarco Ghiandoni
sh. I assume it's related > to https://github.com/rdkit/rdkit/discussions/5195. I'll fix it over the > weekend, and hopefully it'll show up in the next patch release. > Dave > > > On Fri, May 6, 2022 at 1:07 PM Gianmarco Ghiandoni > wrote: > >> Hi Dave, >> &

[Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-04 Thread Gianmarco Ghiandoni
Hi all, I am using rdkit_pypi==2021.9.4 to generate visualisation of compounds with their atomic hydrogen bond strengths. In particular, I am using this function to produce an SVG string: d2d = rdMolDraw2D.MolDraw2DSVG(fig_size[0], fig_size[1]) d2d.drawOptions().annotationFontScale = 0.7

Re: [Rdkit-discuss] Embedding of molecules with incorrect stereochistry assignment

2023-01-19 Thread Gianmarco Ghiandoni
Hi all, Anyone can help with this matter? Thanks, On Tue, 17 Jan 2023 at 13:03, Gianmarco Ghiandoni wrote: > Hi all, > > I have come across an issue while embedding structures with > stereochemistry configurations that presumably lead to clashes between > atoms: > > f

[Rdkit-discuss] V2000/V3000 format inconsistency in RDKit

2023-01-27 Thread Gianmarco Ghiandoni
Hello all, I have come across an unexpected behaviour by RDKit when reading MOL blocks of the same compound in V2000 and V3000 formats. In particular, RDKit seems to perceive the stereochemistry of the compound differently depending on the format. The original compound is a V3000 tab:

[Rdkit-discuss] Embedding of molecules with incorrect stereochistry assignment

2023-01-17 Thread Gianmarco Ghiandoni
Hi all, I have come across an issue while embedding structures with stereochemistry configurations that presumably lead to clashes between atoms: from rdkit import Chem from rdkit.Chem import AllChem smiles="C1N[C@@H]2CO[C@H]1C2" m = Chem.MolFromSmiles(smiles) mh = Chem.AddHs(m)

Re: [Rdkit-discuss] Embedding of molecules with incorrect stereochistry assignment

2023-01-20 Thread Gianmarco Ghiandoni
t; rdkit-discuss@lists.sourceforge.net> > *Sent:* 19 January 2023 17:54 > *To:* Ling Chan ; Gianmarco Ghiandoni < > ghiandon...@gmail.com> > *Cc:* RDKit > *Subject:* Re: [Rdkit-discuss] Embedding of molecules with incorrect > stereochistry assignment > > > > A

[Rdkit-discuss] Fast calculation of hydrogen-bond strengths and free energy of hydration of small molecules

2023-03-21 Thread Gianmarco Ghiandoni
Hello RDKit community, I normally do not use this channel to promote my own research, however, I thought it was a good idea to share a piece of my work with you this time. Myself and a colleague recently published a paper on calculating hydrogen-bond strengths and free energy of hydrations from