Re: [Rdkit-discuss] Error: free(): double free detected in tcache 2 (going from pickles to mol)

2022-12-29 Thread Jason Biggs
Jason Biggs On Thu, Dec 29, 2022 at 3:22 PM Jarod Younker wrote: > The code compiles fine, but I’m running into a memory deallocation issue > in ‘Dummy’ if I use ROMol derived from pickled strings: > > > > Error: free(): double free detected in tcache 2 > > > >

Re: [Rdkit-discuss] two molecules in mol object

2021-03-10 Thread Jason Biggs
Have you looked at GetMolFrags? if you define >m=MolFromSmiles('CCC.CC') then >rdmolops.GetMolFrags(m,asMols=True) returns two molecules, keeping any coordinates or non-computed properties in the process. Jason Biggs On Wed, Mar 10, 2021 at 9:42 AM Shani Zev wrote: > Hi all,

Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Jason Biggs
Jason Biggs On Tue, Mar 9, 2021 at 10:49 AM Maciek Wójcikowski wrote: > Hi Jean-Marc, > > I know you can draw them, but both SMILES and RDKit internally use two > bonds (up/down) directions to assign the bond stereo, which means that > there are not > Fortunately the RDK

[Rdkit-discuss] sanitization converts "I(=O)(=O)[O-]" into "[O-][I+2]([O-])[O-]"

2021-01-21 Thread Jason Biggs
The RDKit will always convert iodate from the form on the left, with an expanded octet on iodine and a single negative charge, into the form on the right with all single bonds and a charge on every atom (image here https://i.stack.imgur.com/hq3St.png). This happens no matter how I import the

[Rdkit-discuss] RWMol, ROMol, and static casting

2021-01-06 Thread Jason Biggs
I have learned what C++ I know in order to build a link to rdkit from my own system, so the following may be more of a general coding question than anything rdkit-specific. I am looking at the python wrappers, and I see many functions return a ROMol object by static casting the RWMol pointer to a

Re: [Rdkit-discuss] SA_scores and QED scores questions?

2020-10-29 Thread Jason Biggs
Have you compared the output of debugMol from your from-smiles ROMol (from test2) versus the ROMol objects you get from the larger program? That can help to explain the differences, though not alway.

Re: [Rdkit-discuss] Counting Stereo centers in CPP. And [H] in SMILES string

2020-10-01 Thread Jason Biggs
On Wed, Sep 30, 2020 at 9:45 PM Steven Pak wrote: > Hello, > > I have been using RDKIT for some time now, and I could not get a certain > descriptor that would be super useful for my work. Every other descriptor > works fine, however, for some reason the following calculations always > gives me

Re: [Rdkit-discuss] Order of linking static libraries

2020-09-14 Thread Jason Biggs
I don't have this problem on mac/windows, but it came up on Linux. Rather than figure out which library or libraries to link twice I just use the idiom --start-group -llib1 -llib2 -llib3 --end-group Maybe that will help with your issue. Jason On Mon, Sep 14, 2020 at 10:46 AM

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-28 Thread Jason Biggs
Jason Biggs On Fri, Aug 28, 2020 at 8:16 PM dmaziuk via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > On 8/27/2020 8:48 PM, Jason Biggs wrote: > > > > I'm not very familiar with how the python interface works, is there a > > similar issue with

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-27 Thread Jason Biggs
ts of error, and many more besides. If you’re developing on > Linux, it’s good practice to use it on any code before you use that program > in earnest. > > Cheers, > Dave > > > On Thu, 27 Aug 2020 at 20:17, Jason Biggs wrote: > >> Everything I know about C++ I le

[Rdkit-discuss] c++ atomic lifetime

2020-08-27 Thread Jason Biggs
Everything I know about C++ I learned just so that I can write a link between an interpreted language and the rdkit, so there are definitely some gaps in my knowledge. What I'm trying to understand right now is the expected lifetime of an Atom pointer returned by a molecule, for instance by the

Re: [Rdkit-discuss] draw molecule without rescaling or translating

2020-07-26 Thread Jason Biggs
helps. If not, please do get back to me either privately or > via the list. It would be useful for future development to find out how > you get on and what would have made it easier for you. > > Best, > Dave > > > > > On Sun, Jul 26, 2020 at 8:37 PM Jason Biggs

[Rdkit-discuss] draw molecule without rescaling or translating

2020-07-26 Thread Jason Biggs
to the width and height used in the MolDraw2D constructor, and I see that there are options fixedBondLength, fixedScale, as well as a setScale method. But I'm not clear on what values to set in these to set the rescaling to 1 and translation to 0. Thanks Jason Biggs

Re: [Rdkit-discuss] Get the Exact Mass from a Molecular Formula field

2020-03-23 Thread Jason Biggs
You can get the most common isotope mass from the periodic table. Here is a small modification to the code you linked, https://gist.github.com/jasondbiggs/cadc261ed00a08054ad5c4a85cccd9d4 Jason Biggs On Mon, Mar 23, 2020 at 9:21 AM Pierre-Marie Allard < pierre-marie.all...@unige.ch>

Re: [Rdkit-discuss] AdditionalOutput from FingerprintGenerator

2020-03-16 Thread Jason Biggs
99 > > I will take a look and see if it's possible to get these into the next > release. In the meantime, if you want that info it looks like you'll need > to use the older fingerprinting functions. > > -greg > > On Fri, Mar 13, 2020 at 11:10 PM Jason Biggs > wrote: > >

Re: [Rdkit-discuss] AdditionalOutput from FingerprintGenerator

2020-03-13 Thread Jason Biggs
gerprints using the new API? Jason Biggs On Fri, Mar 13, 2020 at 10:20 AM Greg Landrum wrote: > Hi Jason, > > At the moment there's nothing available here except what's in the C++ > tests. This part of the code didn't end up being completely finished before > the GSoC proj

[Rdkit-discuss] AdditionalOutput from FingerprintGenerator

2020-03-12 Thread Jason Biggs
I am taking a look at the FingerprintGenerator class and I really like this unified interface for these four types of fingerprints. I have very limited experience with the fingerprint code before the generator API was introduced. What I'm not sure about is how to get information about the

Re: [Rdkit-discuss] Smarts conversion help

2019-03-27 Thread Jason Biggs
On Tue, Mar 26, 2019 at 8:22 PM Patrick Walters wrote: > HI Xiaobo, > > There's an explicit hydrogen in the SMARTS that shouldn't be there. I > also wouldn't include the single bonds around the ring closures. > To be fair, that explicit hydrogen was in the original SMILES string, so it is

Re: [Rdkit-discuss] Why this doesn't work? HasStructMatch function

2019-02-19 Thread Jason Biggs
Change your pattern to use ~ as an unspecified bond instead of - for a single bond: >m=Chem.MolFromSmiles('CN(C(C=CC=C1)=C1C2=O)C3=C2C=CC=C3') >s=Chem.MolFromSmarts('c1c1~[#6](~c2c2)=[#8]') >m.HasSubstructMatch(s) True Jason On Tue, Feb 19, 2019 at 4:42 PM Li, Xiaobo [xiaoboli] <

Re: [Rdkit-discuss] MMFF changing molecule

2019-02-06 Thread Jason Biggs
omaticity(m2) > > m2.GetSubstructMatches(Chem.MolFromSmarts('a')) > > ((1,), (2,), (3,), (4,), (5,), (7,), (8,), (9,), (10,), (12,), (13,), (14,)) > > > Cheers, > p. > > On 02/05/19 20:31, Jason Biggs wrote: > > I noticed that I'm getting a diffe

[Rdkit-discuss] MMFF changing molecule

2019-02-05 Thread Jason Biggs
object using that copy (which can then be discarded). Is there a better workaround? Jason Biggs ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Re: [Rdkit-discuss] InChI to Mol to InChi

2018-12-18 Thread Jason Biggs
he 3D bond stereo but the smiles doesn't until you remove and re-detect the stereo? Does the InChI code go to the 3D structure when present and ignore stereo information in the mol object? Jason Biggs On Tue, Dec 18, 2018 at 12:14 PM Christos Kannas wrote: > Hi Jean-Marc, > > Ther

Re: [Rdkit-discuss] InChI to Mol to InChi

2018-12-17 Thread Jason Biggs
in the mailing list?) Jason Biggs On Mon, Dec 17, 2018 at 7:24 AM JEAN-MARC NUZILLARD < jm.nuzill...@univ-reims.fr> wrote: > Dear all, > > I tried to transform an InChI into a Mol and back to InChi. > > The following code: > > inchi1 = > > "InChI=1S/C20H26O4

[Rdkit-discuss] GETAWAY descriptor returning non-numeric values

2018-11-29 Thread Jason Biggs
I don't know enough about the GETAWAY descriptor to know if this is to be expected. >>>m = Chem.MolFromSmiles('CC=O') >>>m2=Chem.AddHs(m) >>>AllChem.EmbedMolecule(m2,randomSeed = 1234) >>>(Chem.rdMolDescriptors.CalcGETAWAY(m2))[85:90] [0.207, 0.008, 0.027, nan, 0.0] Is this a bug? If not, is

Re: [Rdkit-discuss] (no subject)

2018-07-31 Thread Jason Biggs
]]) > > Chem.rdMolAlign.AlignMol(mol2,mol, atomMap = ((0,0),(1,1))) > >> 0.005493118189962501 > > mol2.GetConformer(0).GetPositions() > >> array([[ 3.10580323, -0.07674776, -0.45975102], >>[ 1.75185317, 0.36881027, 0.04161089]]) > > Jason Biggs On T

Re: [Rdkit-discuss] A couple of questions about CoordGen in RDKit

2018-06-02 Thread Jason Biggs
plements them. Would it be wrong to call the rdkit method "DistanceGeometry"? What is the main distinction between the two methods? Best, Jason (the image from Nicola's email didn't come through to me, showing the example with template on the bottom, without template on the top - big

[Rdkit-discuss] A couple of questions about CoordGen in RDKit

2018-05-31 Thread Jason Biggs
I recently switched to the 2018_03_1 release, and I am trying out the new 2D coordinate generating functions. The diagrams look good, but I can't seem to figure out what the role of the template file is. I find that I can set the templateFileDir parameter either to a real directory with the

[Rdkit-discuss] EmbedMolecule ignoring double-bond ring stereochemistry

2018-05-02 Thread Jason Biggs
I don't know if this is a duplicate of https://github.com/rdkit/rdkit/issues/435 I notice that ring double-bond stereo gets quietly ignored by the embedding code. Trying to make cis and trans cyclododecene (choosing a large ring to minimize any strain), and they both come out cis. Using the

Re: [Rdkit-discuss] cmake error building master

2018-04-19 Thread Jason Biggs
wnload the maeparser, the coordgenlibs, and the rapidjson files and put them in External/ then it works fine. Thanks, Jason Jason Biggs On Thu, Apr 19, 2018 at 12:42 PM, Greg Landrum <greg.land...@gmail.com> wrote: > Which version of boost is that? > > On Thu, 19 Apr 2018 at 19:34,

[Rdkit-discuss] cmake error building master

2018-04-19 Thread Jason Biggs
Trying to build on Scientific Linux release 6.9, and I'm getting boost serialization errors, both on the recent release branch and on master In file included from > base/Boost/include/boost/numeric/ublas/vector.hpp:21:0, > from

Re: [Rdkit-discuss] edge matrix

2018-01-17 Thread Jason Biggs
, 0, 0, 0}, {1, 0, 1, 1, 0}, {0, 1, 0, 0, 0}, {0, 1, 0, 0, 1}, {0, 0, 0, 1, 0}}; graph = AdjacencyGraph[adjacencyMatrix]; lineGraph = LineGraph[graph]; AdjacencyMatrix[lineGraph] // MatrixForm [image: Inline image 1] Jason Biggs On Wed, Jan 17, 2018 at 10:21 AM, Marta Stępniewska-Dziubińska

Re: [Rdkit-discuss] mol file parsing, 3D or 2D

2018-01-17 Thread Jason Biggs
On Wed, Jan 17, 2018 at 10:12 AM, Dimitri Maziuk wrote: > On 2018-01-16 22:46, Greg Landrum wrote: > > It might be worth thinking about adding an option to the aromaticity >> perception code to maintain the original bond types and just set the >> "isAromatic" flag on the

Re: [Rdkit-discuss] mol file parsing, 3D or 2D

2018-01-15 Thread Jason Biggs
Thanks for the detailed reply > > The fact that this isn't happening for you indicates that you are reading > the molecules in without sanitizing them - the mol file parser calls > assignStereochemistry() by default if you sanitize. Are you sure that you > should be disabling sanitization? > > I

Re: [Rdkit-discuss] RDKit and Google Summer of Code 2018

2018-01-15 Thread Jason Biggs
External folder and write python wrappers. Jason Biggs On Mon, Jan 15, 2018 at 1:09 AM, Greg Landrum <greg.land...@gmail.com> wrote: > Dear all, > > We've been invited again to participate in the OpenChemistry application > for Google Summer of Code. > > In order to part

[Rdkit-discuss] mol file parsing, 3D or 2D

2018-01-14 Thread Jason Biggs
Two question about mol file conformer reading: Looking through the .mol files included for testing, and chose "Code/GraphMol/Depictor/test_data/7UPJ_spread.mol" at random. When I read in this file using the RDKit::MolFileToMol function, and then query its conformer's is3D() method, it returns

[Rdkit-discuss] RDKit and Mathematica

2018-01-12 Thread Jason Biggs
::ROMol as the underlying structure. As we find bugs, we will report them, and when we implement functionality that that isn't available in the RDKit, I'm hoping to add back to the community here. Best wishes, Jason Biggs PS - I find it to be surreal, but my boss has taken to live-streaming our design

Re: [Rdkit-discuss] How to convert numpy array to rdkit fingerprint object?

2018-01-11 Thread Jason Biggs
(bv1.GetBit(i)) False True True True False True False True False True True True False True True True True True False False Jason Biggs On Thu, Jan 11, 2018 at 9:30 AM, Michał Nowotka <mmm...@gmail.com> wrote: > Hi, > > Imagine I have two numpy arrays containing zeros and

Re: [Rdkit-discuss] strange linker error using VC++

2018-01-11 Thread Jason Biggs
DKit::SmilesToMol(smi); > RDKit::ROMol molCopy(*mol); > delete mol; > std::string res = RDKit::MolToSmiles(molCopy); > > Cheers, > p. > > > On 11/01/2018 02:33, Jason Biggs wrote: > > I'm trying to use the rdkit as a library in another project, and am having

[Rdkit-discuss] strange linker error using VC++

2018-01-10 Thread Jason Biggs
I'm trying to use the rdkit as a library in another project, and am having trouble getting it to build on windows. I can get the code to compile on mac and linux, but it fails for windows, both 32-big and 64-bit varieties. I don't know how specific this is to the rdkit, but I have zero experience

Re: [Rdkit-discuss] SanitizeMol changing drawing

2017-12-14 Thread Jason Biggs
ing the depiction code and replacing > the use of CIP ranks with the atom ranking generated by Nadine's > canonicalization code > > -greg > > > On Wed, Dec 13, 2017 at 10:38 PM, Jason Biggs <jasondbi...@gmail.com> > wrote: > >> using the recent release,

[Rdkit-discuss] SanitizeMol changing drawing

2017-12-13 Thread Jason Biggs
duce the same pickle, pickle.dumps(m) == pickle.dumps(m2) True So why do they get treated differently by the drawing code? The only way to return m2 to its original state is to run AssignStereoChemistry with force = True. What variable is being thrown off by SanitizeMol? [image: Inline i

Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Jason Biggs
tating so. Jason Jason Biggs On Fri, Dec 1, 2017 at 5:33 PM, Sundar <jubilantsun...@gmail.com> wrote: > Hi Jason, > > This is great. I would really benefit from this. > At present I am looking for a way to download smiles or mol data of a few > compound which only have SIDs

Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Jason Biggs
in JSON format, but you can have it return XML or plain text. If you want an SDF file, something like https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/SDF?record_type=3d setting up a python function to query this shouldn't be difficult. Jason Biggs On Fri, Dec 1, 2017 at 12:51 PM

Re: [Rdkit-discuss] bad coordinates for acetylenic hydrogens

2017-12-01 Thread Jason Biggs
, -7.5000e-01, 0.e+00], [ 4.36280422e-16, 7.5000e-01, 0.e+00]]) The above seems to happen with any terminal alkyne hydrogen. I will file an issue for this Jason Jason Biggs On Fri, Dec 1, 2017 at 4:59 AM, Malitha Kabir <malitha12...@gmail.com> wrote:

[Rdkit-discuss] bad coordinates for acetylenic hydrogens

2017-11-30 Thread Jason Biggs
a hack on my end to look for this special case, but where in the drawing code does it decide where to place hydrogens? Jason Biggs -- Check out the vibrant tech community on one of the world's most engaging tech sites

Re: [Rdkit-discuss] transformation of an atom or group of atoms by atom indices

2017-11-09 Thread Jason Biggs
Something along these lines? mol = Chem.MolFromSmiles('')emol = Chem.EditableMol(mol)emol.ReplaceAtom(3, Chem.Atom(1))mol = emol.GetMol() In [12]: Chem.MolToSmiles(mol) Out[12]: '[H]CCC' In [13]: Chem.MolToSmiles(Chem.RemoveHs(mol)) Out[13]: 'CCC' Jason Biggs On Thu, Nov 9, 2017

Re: [Rdkit-discuss] SMARTS for Joback and Reid method

2017-11-08 Thread Jason Biggs
;C=O (ring)","[$([#6X3H0](=[OX1]));!$([#6X3](=[#8X1])~[#8X2]);R]=O"}, {"Aldehyde","O=CH-","[CX3H1](=O)"}, {"CarboxylicAcid", "COOH", "[OX2H]-[C]=O"}, {"Ester", "-C(=O)O-", "[#6X3H0;!$([#6X3H0](~O)(~O)(~O))

[Rdkit-discuss] what if all explicit hydrogens were actual atoms

2017-10-12 Thread Jason Biggs
://sourceforge.net/p/rdkit/mailman/message/30200937/, but it looks like the branch mentioned there was abandoned. Jason Biggs -- Check out the vibrant tech community on one of the world's most engaging tech sites

Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Jason Biggs
Thanks to Curt, Markus, and John for helping me understand this. I knew that inchi had its limitations, but that didn't jump out at me here because there's no hydrogen migration between the different forms - not realizing these forms also qualify as tautomers. But So this is definitely a feature

Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Jason Biggs
like different structures due to the specified charges. Is this a limitation of inchi, or do I need to rethink my ideas of what makes two chemical structures the same? Jason Biggs On Thu, Sep 14, 2017 at 12:38 PM, John Mayfield <john.wilkinson...@gmail.com > wrote: > InChI is an identifi

Re: [Rdkit-discuss] how to output multiple Kekule structures

2017-09-11 Thread Jason Biggs
ts('[c]=[c]-[c]')) > True So at the very least, you need to change the smarts strings to use [#6] instead of [C] Jason Biggs On Mon, Sep 11, 2017 at 2:53 PM, Paolo Tosco <paolo.to...@unito.it> wrote: > Hi Jim, > > you can indeed enumerate all Kekulè structures for a mol

Re: [Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread Jason Biggs
ter mentions, by default if you read in a kekulized SMILES string, the mol you create will not be kekulized, but it sounds like you are intentionally kekulizing before doing substructure matching. Jason Biggs On Fri, Sep 8, 2017 at 5:19 PM, James T. Metz via Rdkit-discuss < rdkit-discuss@lists.

Re: [Rdkit-discuss] ETKDG conformation generation algorithm and fullerene-like structures.

2017-09-07 Thread Jason Biggs
::DGeomHelpers::EmbedParameters params(RDKit::DGeomHelpers::ETDG); RDKit::DGeomHelpers::EmbedMolecule(*mol, params); bool explicitOnly = false; bool addCoords = true; RDKit::MolOps::addHs(*mol, explicitOnly, addCoords); seems to work. Jason Biggs On Thu, Sep 7, 2017 at 10:49 AM, Dmitry Redkin <

Re: [Rdkit-discuss] Extracting data of a standard structural formula

2017-08-13 Thread Jason Biggs
Peleg, I was doing something similar using the c++ function compute2DCoords, where you can give a coordinate map as the second argument. It looks like this is exposed in python, using the Compute2DCoords method ( http://www.rdkit.org/Python_Docs/rdkit.Chem.rdchem.Mol-class.html#Compute2DCoords),

[Rdkit-discuss] How to assign stereochemistry from CIP code?

2017-07-27 Thread Jason Biggs
When creating a molecule, I can set a stereocenter by setting the chiralTag to be clockwise or counterclockwise, and get back the absolute chirality int atoms [5] = {7, 6, 6, 8, 9}; RDKit::RWMol *mol = new RDKit::RWMol(); for (int i : atoms) { RDKit::Atom atom(i); mol->addAtom(); }