Re: [Rdkit-discuss] separate module by breaking bonds

2013-05-31 Thread Yingfeng Wang
Greg, Thank you very much. Yingfeng On Fri, May 31, 2013 at 4:14 AM, Greg Landrum greg.land...@gmail.comwrote: On Fri, May 31, 2013 at 7:53 AM, Yingfeng Wang ywang...@gmail.com wrote: I think I need to add masses of all atoms for getting the mass of the whole fragment. Am I right

Re: [Rdkit-discuss] separate module by breaking bonds

2013-05-31 Thread Yingfeng Wang
let me know how to remove the extra mass? Thanks. Yingfeng On Fri, May 31, 2013 at 8:58 AM, Yingfeng Wang ywang...@gmail.com wrote: Greg, Thank you very much. Yingfeng On Fri, May 31, 2013 at 4:14 AM, Greg Landrum greg.land...@gmail.comwrote: On Fri, May 31, 2013 at 7:53 AM, Yingfeng

[Rdkit-discuss] dissociation energy

2013-05-31 Thread Yingfeng Wang
How do I retrieve the dissociation energy of a bond in a molecule. Say, I have from rdkit import Chem m =Chem.MolFromInchi('InChI=1S/C10H9N3O/c1-7-11-10(14)9(13- 12-7)8-5-3-2-4-6-8/h2-6H,1H3,(H,11,12,14)') mybond = m.GetBondBetweenAtoms(8,7) Is there a way for me to retrieve the dissociation

Re: [Rdkit-discuss] separate module by breaking bonds

2013-05-31 Thread Yingfeng Wang
() is for the exact molecular weight of the molecule. What do I observe so big difference of mass? By the way, the mass of m calculated by the ExactMolWt () is still less than summation of its fragments. Thanks. Yingfeng On Fri, May 31, 2013 at 3:58 PM, Yingfeng Wang ywang...@gmail.com wrote: Greg, I got

Re: [Rdkit-discuss] separate module by breaking bonds

2013-06-02 Thread Yingfeng Wang
Dear Greg, Thank you very much! I think 'C6H5' is good enough to me. Yingfeng On Sun, Jun 2, 2013 at 12:25 AM, Greg Landrum greg.land...@gmail.comwrote: On Sat, Jun 1, 2013 at 6:46 AM, Yingfeng Wang ywang...@gmail.com wrote: Dear Greg, Thanks. As for In [19]: frags = Chem.GetMolFrags

[Rdkit-discuss] install error

2013-06-04 Thread Yingfeng Wang
After getting the latest code by git, I install RDKit on my ubuntu 12.04. In the step of make install, I got CMake Error at External/INCHI-API/cmake_install.cmake:124 (FILE): It seems the file $RDBASE/lib/libRDInchiLib.so.1.2013.06.1pre can't be found. Please note that I have turned on the flag

Re: [Rdkit-discuss] install error

2013-06-05 Thread Yingfeng Wang
2013 04:13, Yingfeng Wang ywang...@gmail.com wrote: After getting the latest code by git, I install RDKit on my ubuntu 12.04. In the step of make install, I got CMake Error at External/INCHI-API/cmake_install.cmake:124 (FILE): It seems the file $RDBASE/lib/libRDInchiLib.so.1.2013.06.1pre can't

Re: [Rdkit-discuss] install error

2013-06-05 Thread Yingfeng Wang
On 2013-06-05 16:55, Yingfeng Wang wrote: Yes, I did. export RDBASE=/opt/RDKit_latest/latest export LD_LIBRARY_PATH=$RDBASE/lib:$LD_LIBRARY_PATH export PYTHONPATH=$RDBASE:$PYTHONPATH I put them on ~/.bashrc On Wed, Jun 5, 2013 at 10:53 AM, Jan Holst Jensen j...@biochemfusion.comwrote

Re: [Rdkit-discuss] separate module by breaking bonds

2013-06-05 Thread Yingfeng Wang
of fragments? Thanks. Yingfeng On Sun, Jun 2, 2013 at 8:39 AM, Yingfeng Wang ywang...@gmail.com wrote: Dear Greg, Thank you very much! I think 'C6H5' is good enough to me. Yingfeng On Sun, Jun 2, 2013 at 12:25 AM, Greg Landrum greg.land...@gmail.comwrote: On Sat, Jun 1, 2013 at 6:46

[Rdkit-discuss] mass of proton

2013-06-21 Thread Yingfeng Wang
With the following code, from rdkit import Chem from rdkit.Chem import Descriptors from rdkit.Chem import AllChem a = Chem.MolFromSmiles([H+]) Descriptors.ExactMolWt(a) 0.0 I got mass 0.0 If I switch to Inchi format, I get same result. a = Chem.MolFromInchi(InChI=1S/p+1)

Re: [Rdkit-discuss] mass of proton

2013-06-22 Thread Yingfeng Wang
, On Fri, Jun 21, 2013 at 4:40 PM, Yingfeng Wang ywang...@gmail.com wrote: With the following code, from rdkit import Chem from rdkit.Chem import Descriptors from rdkit.Chem import AllChem a = Chem.MolFromSmiles([H+]) Descriptors.ExactMolWt(a) 0.0 snip Is it normal? Nope. It's

Re: [Rdkit-discuss] mass of proton

2013-06-22 Thread Yingfeng Wang
-;/t19-,21-,23+,24+,41-,42-;/m0./s1 [15:30:12] WARNING: Problems/mismatches: Mobile-H( Hydrogens: Number; Mobile-H groups: One instead of multiple, Attachment points, Number; Charge(s): Do not match; Stereobonds/cumulenes: Missing known) On Sat, Jun 22, 2013 at 7:59 AM, Yingfeng Wang ywang

Re: [Rdkit-discuss] random compound

2013-07-04 Thread Yingfeng Wang
Landrum greg.land...@gmail.comwrote: On Tue, Jul 2, 2013 at 5:20 PM, Yingfeng Wang ywang...@gmail.com wrote: If I have the formula, is RDKit able to generate a random compound based on the given formula? It's not, but it is kind of an interesting problem to think about.[1] -greg [1] Note

[Rdkit-discuss] install RDKit on CentOS

2013-07-14 Thread Yingfeng Wang
I failed to install RDKit on CentOS. The error message is [ 85%] Built target MolChemicalFeatures Linking CXX executable testSLNParse [ 85%] Built target rdSLNParse /home/yingfeng/software/boost/boost_1_54_0/stage/lib/libboost_regex.so: undefined reference to

Re: [Rdkit-discuss] install RDKit on CentOS

2013-07-15 Thread Yingfeng Wang
Gianluca, I am using CentOS 5.8. But I am just a regular user. So I prefer to install RDkit by building it from source. Thanks. Yingfeng On Mon, Jul 15, 2013 at 5:51 AM, Gianluca Sforna gia...@gmail.com wrote: On Sun, Jul 14, 2013 at 10:57 PM, Yingfeng Wang ywang...@gmail.com wrote: I

Re: [Rdkit-discuss] install RDKit on CentOS

2013-07-15 Thread Yingfeng Wang
Hi Greg, I just tried 1.51, and got same problem. Thanks. Yingfeng On Mon, Jul 15, 2013 at 7:49 AM, Yingfeng Wang ywang...@gmail.com wrote: Greg, I also tried boost 1.49.0, and met same problem. If necessary, I can try 1.51. Yingfeng On Mon, Jul 15, 2013 at 5:02 AM, Greg Landrum

Re: [Rdkit-discuss] install RDKit on CentOS

2013-07-16 Thread Yingfeng Wang
, but did you try pulling boost with Yum? I was able to get RDKit, and the Java wrappers, to cleanly compile on CentOS 6.4 with that flavor of boost. Matt On Mon, Jul 15, 2013 at 9:39 PM, Greg Landrum greg.land...@gmail.comwrote: On Mon, Jul 15, 2013 at 7:49 AM, Yingfeng Wang ywang

Re: [Rdkit-discuss] install RDKit on CentOS

2013-07-16 Thread Yingfeng Wang
Matthew, Thanks. Yingfeng On Tue, Jul 16, 2013 at 10:11 AM, Matthew Lardy mla...@gmail.com wrote: Yingfeng, That's really unfortunate! Hopefully, you can punch through this quickly! Best, Matthew On Tue, Jul 16, 2013 at 5:29 AM, Yingfeng Wang ywang...@gmail.com wrote: Matthew

Re: [Rdkit-discuss] install RDKit on CentOS

2013-07-16 Thread Yingfeng Wang
at 7:49 AM, Yingfeng Wang ywang...@gmail.com wrote: I also tried boost 1.49.0, and met same problem. If necessary, I can try 1.51. hmm, ok, so much for that idea. Let's try something else. On Sunday, July 14, 2013, Yingfeng Wang wrote: I failed to install RDKit on CentOS. The error

[Rdkit-discuss] compound mass calculation

2013-12-18 Thread Yingfeng Wang
I have two different compounds with the same formula. But I got different mass. sInchi = InChI=1S/C5H9NO4/c6-3(5(9)10)1-2-4(7)8/h3H,1-2,6H2,(H,7,8)(H,9,10)/p-1/t3-/m0/s1 current_mol = Chem.MolFromInchi(sInchi) current_mass = Descriptors.ExactMolWt(current_mol) print current_mass

Re: [Rdkit-discuss] compound mass calculation

2013-12-18 Thread Yingfeng Wang
On 19 December 2013 11:18, Yingfeng Wang ywang...@gmail.com wrote: Peter, Thanks. Is there is a way to calculate the neutral mass of a compound even if the Inchi indicates that this compound is negatively charged? Yingfeng On Wed, Dec 18, 2013 at 7:50 PM, Peter Gedeck peter.ged

[Rdkit-discuss] generate 2D figure

2014-02-17 Thread Yingfeng Wang
I want to draw a 2D figure of a compound. And I follow the example given at the following link, http://www.rdkit.org/docs/GettingStartedInPython.html My code is given as follows, from rdkit.Chem import AllChem from rdkit import Chem m = Chem.MolFromSmiles('c1nccc2n1ccc2')

Re: [Rdkit-discuss] generate 2D figure

2014-02-19 Thread Yingfeng Wang
-condition Violation On Wed, Feb 19, 2014 at 3:27 PM, Yingfeng Wang ywang...@gmail.com wrote: Adrian, I meet a weird case. import matplotlib.offsetbox from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import Draw m = Chem.MolFromSmiles('ccc[nH]c') I got non-ring

Re: [Rdkit-discuss] generate 2D figure

2014-02-20 Thread Yingfeng Wang
try: AllChem.Compute2DCoords(m) for second example: m = Chem.MolFromSmiles('C(=O)OCCO') AllChem.Compute2DCoords(m) 2014-02-19 21:46 GMT+01:00 Yingfeng Wang ywang...@gmail.com: Here are more details. If I use m = Chem.MolFromSmiles('ccc[nH]c', sanitize=False

[Rdkit-discuss] identify anti-aromatic bonds

2015-08-24 Thread Yingfeng Wang
According to the following link, http://www.rdkit.org/docs/RDKit_Book.html I get sample code for identifying identify anti-aromatic bonds like from rdkit import Chem m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') m.GetBondBetweenAtoms(6,7).GetIsAromatic() Is there a way to identify

Re: [Rdkit-discuss] identify anti-aromatic bonds

2015-08-24 Thread Yingfeng Wang
() Is there a way to identify anti-aromatic bonds using Rdkit? Thanks. Yingfeng On Mon, Aug 24, 2015 at 9:38 PM, Yingfeng Wang ywang...@gmail.com wrote: According to the following link, http://www.rdkit.org/docs/RDKit_Book.html I get sample code for identifying identify anti-aromatic bonds like from

Re: [Rdkit-discuss] identify anti-aromatic bonds

2015-08-27 Thread Yingfeng Wang
Could anyone please share your experience with identifying non-aromatic bonds using RDKit? I would greatly appreciate your help. Yingfeng On Mon, Aug 24, 2015 at 9:42 PM, Yingfeng Wang ywang...@gmail.com wrote: Sorry, my previous email has a typo. According to the following link, http

Re: [Rdkit-discuss] identify anti-aromatic bonds

2015-08-28 Thread Yingfeng Wang
://rdkit.org/docs/RDKit_Book.html#aromaticity -greg On Thu, Aug 27, 2015 at 5:36 PM, Yingfeng Wang ywang...@gmail.com wrote: Greg, Thanks. I believe identifying anti-aromatic bonds even just with simple rings will be very helpful to my project. Could you please give me some links or sample codes

Re: [Rdkit-discuss] link RDKit C++ libraries when using g++ on linux

2016-05-30 Thread Yingfeng Wang
was > executed. > If it's when you ran the program: please show the results of "ldd EXENAME" > where EXENAME is the program you're running. > > Best. > -greg > > > On Mon, May 30, 2016 at 5:25 AM, Yingfeng Wang <ywang...@gmail.com> wrote: > >> I use the fo

Re: [Rdkit-discuss] link RDKit C++ libraries when using g++ on linux

2016-06-01 Thread Yingfeng Wang
-lSubgraphs -lSubstructMatch -L/home/wyf/anaconda3/pkgs/boost-1.60.0-py27_0/lib -lboost_system -lboost_filesystem Hope my experience can help others to avoid the similar problem. Thanks. Yingfeng On Tue, May 31, 2016 at 10:22 PM, Yingfeng Wang <ywang...@gmail.com> wrote: > Greg, > > I

[Rdkit-discuss] link RDKit C++ libraries when using g++ on linux

2016-05-29 Thread Yingfeng Wang
I use the following setting for Apple LLVM version 6.0 (clang-600.0.57). CXXFLAGS= -Wall -O2 -std=c++11 -I ${RDBASE}/Code -I ${RDBASE}/lib -I ${RDBASE}/External -I ${BOOSTBASE}/include LDFLAGS=-L${RDBASE}/lib -lAlignment -lCatalogs -lChemReactions -lChemTransforms -lChemicalFeatures

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-18 Thread Yingfeng Wang
oubled times, but it's easy enough to try. > > -P. > > On Wed, Mar 16, 2016 at 8:46 AM, Yingfeng Wang <ywang...@gmail.com> wrote: > >> Peter, >> >> Thanks. Do you mean >> >> -lLibA_static -lLibB_static -lLibC_static -lLibA_static -lLibB_static >>

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-15 Thread Yingfeng Wang
, 2016 at 8:16 AM, Greg Landrum <greg.land...@gmail.com> wrote: > > > On Sat, Mar 12, 2016 at 5:00 AM, Yingfeng Wang <ywang...@gmail.com> wrote: > >> Greg, >> >> Thanks. Your suggestion solves my problem. I add the following part in my >> compiling comma

[Rdkit-discuss] compiling error with C++ on maverick

2016-03-11 Thread Yingfeng Wang
After installing RDKit, I try to compile the following code in main.cpp, #include #include using namespace RDKit; using namespace std; int main(int argc, const char * argv[]) { string curInchi = "InChI=1S/C10H9N3O/c1-7-11-10(14)9(13-12-7)8-5-3-2-4-6-8/h2-6H,1H3,(H,11,12,14)";

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-12 Thread Yingfeng Wang
braries. If you are using > the InChI code, you need to link against: RDInchiLib, InChi, GraphMol, and > RDGeneral. There may be a few others as well. > > -greg > > > > > > On Sat, Mar 12, 2016 at 5:13 AM, Yingfeng Wang <ywang...@gmail.com> wrote: > >>

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
.land...@gmail.com> > wrote: > >> Though that would be useful information, I'm afraid that's not something >> I've ever put together. >> >> -greg >> >> >> >> On Tue, Mar 15, 2016 at 6:26 PM, Yingfeng Wang <ywang...@gmail.com> >> wrot

Re: [Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-11 Thread Yingfeng Wang
onst ROMol > <http://rdkit.org/docs/cppapi/classRDKit_1_1ROMol.html> & *mol*, bool > *sanitizeFrags* = true, > by any chance? This will return a vector of ROMol's which correspond to > the contiguous fragments. > > Igor > > > On Sun, Apr 10, 2016 at 11:04 PM,

Re: [Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-11 Thread Yingfeng Wang
#L483 > > There is a nice if-else that shows you how to get the behaviors of asMols > = False, then asMols=True. There is obviously a little bit of manipulation > to get the output into python, but hopefully it is clear how one might make > a similar pure C++ function. > > -

Re: [Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-10 Thread Yingfeng Wang
, Apr 10, 2016 at 10:49 PM, Greg Landrum <greg.land...@gmail.com> wrote: > > > On Mon, Apr 11, 2016 at 1:35 AM, Yingfeng Wang <ywang...@gmail.com> wrote: >> >> >> Thanks. Say, the current RWMol object has 10 bonds, so ids of these bonds >> should be from

[Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-10 Thread Yingfeng Wang
In python, I have GetMol() for Chem.EditableMol. I can also use Chem.GetMolFrags(...). Could you please help me to know how to get similar functions in C++? For example, I remove two bonds in an RWMol object, how do I use GetMol() and GetMolFrags(...) in C++? Thanks. Yingfeng

Re: [Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-10 Thread Yingfeng Wang
on't have to, RWMol can be sent to any function that takes an > ROMol. > > Actually, this is true now in Python as well. > > In C++ if you really need to copy the molecule: > > ROMol mol = new ROMol( *rwmol ); > > But you really don't have to. > > > Brian Kelle

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
ect that builds a test project against a built > distribution. It could prove useful as a basis for building C++ extensions. > > Basically we would hedge our bets and just link against everything :) > > Cheers, > Brian > > On Wed, Mar 16, 2016 at 8:47 AM, Yingfeng Wang <ywan

Re: [Rdkit-discuss] ring bond query

2016-04-13 Thread Yingfeng Wang
call should fix your problem. > > Kind regards, > Paolo > > > On 4/13/2016 16:48, Yingfeng Wang wrote: > > This is my C++ code. > > > #include > #include > #include > #include > #include > > using namespace RDKit; > using namespac

Re: [Rdkit-discuss] ring bond query

2016-04-13 Thread Yingfeng Wang
!bond->getOwningMol().getRingInfo()->isInitialized()) { > MolOps::findSSSR(bond->getOwningMol()); > } > return bond->getOwningMol().getRingInfo()->numBondRings(bond->getIdx()) > != 0; > } > > > On Wed, Apr 13, 2016 at 11:59 AM, Yingfeng Wang <ywan

[Rdkit-discuss] minGW fails to build rdkit

2016-12-19 Thread Yingfeng Wang
I try to use minGW to build rdkit_2016_09_2, which is from the following link. https://github.com/rdkit/rdkit/archive/Release_2016_09_2.zip cmake command is cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DMSVC_RUNTIME_DLL="C:\Windows\System32\msvcr100.dll" -DBOOST_ROOT="C:\boost"

Re: [Rdkit-discuss] minGW fails to build rdkit

2016-12-20 Thread Yingfeng Wang
CMD shell using mingw32-make.exe. > > Make sure you start from a clean build directory before issuing the cmake > command. > > Cheers, > p. > > > On 12/20/16 04:47, Yingfeng Wang wrote: > > I try to use minGW to build rdkit_2016_09_2, which is from the following >

Re: [Rdkit-discuss] minGW fails to build rdkit

2016-12-21 Thread Yingfeng Wang
Paolo, Could you please let me know the version of your minGW and how you got or built boost with minGW. I kept getting errors like "duplicate section" with different size. Thanks. Yingfeng On Tue, Dec 20, 2016 at 10:13 AM, Yingfeng Wang <ywang...@gmail.com> wrote: > P

Re: [Rdkit-discuss] compiling simple cpp script for OS X

2019-01-17 Thread Yingfeng Wang
Andreas, Could you please share your Makefile? I am also using the C++ API of RDKit on Mac. This is my current Makefile. CC= g++ OPENMPFLAG=#-fopenmp CXXFLAGS=-Wall -O2 -std=c++11 -I${RDBASE}/Code -I${RDBASE}/lib -I${RDBASE}/External -I${BOOSTBASE}/include -I${EGGBASE} LDFLAGS=-L${RDBASE}/lib

Re: [Rdkit-discuss] implicit conversion of smart pointer with version 2018_03_4

2018-12-12 Thread Yingfeng Wang
egin]; > to: > Atom *atom = (*pCurrentROMol)[*atBegin]; > or, even simpler: > auto atom = (*pCurrentROMol)[*atBegin]; > > things should work. > -greg > > > On Wed, Dec 12, 2018 at 12:36 AM Yingfeng Wang wrote: > >> I am using the C++ library of RDKit on Mac.

Re: [Rdkit-discuss] implicit conversion of smart pointer with version 2018_03_4

2018-12-12 Thread Yingfeng Wang
g to copy the > atom, and control ownership with the shared_ptr? > > - dan nealschneider > > (né wandschneider) > > Senior Developer > Schr*ö*dinger, Inc > Portland, OR > > > > > On Tue, Dec 11, 2018 at 3:36 PM Yingfeng Wang wrote: > >> I am using the C++

Re: [Rdkit-discuss] implicit conversion of smart pointer with version 2018_03_4

2018-12-12 Thread Yingfeng Wang
InRing(bond.get())) ? "ring|" : "linear|" ); ... ++firstB; } However, I still have a question. Why "Atom *atom" and "Bond *bond" do not work? Yes, "auto" solves the problem, but I feel it just covers the essential issue. Thanks. Yingfeng On We

[Rdkit-discuss] implicit conversion of smart pointer with version 2018_03_4

2018-12-11 Thread Yingfeng Wang
I am using the C++ library of RDKit on Mac. My C++ code works with RDKit_2017_09_3. However, after I switch to RDKit 2018_03_4, I got the following error when compiling my C++ source code. *Database.cpp:148:33: **error: **no viable conversion from 'const RDKit::Atom *' to* *

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

2018-12-17 Thread Yingfeng Wang
Jason, I can see the image :-) Yingfeng On Mon, Dec 17, 2018 at 10:01 AM Jason Biggs wrote: > Is this the same issue as https://github.com/rdkit/rdkit/issues/1852? > where the input string specifies a trans double bond in a ring but > EmbedMolecule returns a cis configuration? I get

Re: [Rdkit-discuss] implicit conversion of smart pointer with version 2018_03_4

2018-12-13 Thread Yingfeng Wang
Greg, I figure it out. Adding const should work. const Atom *atom = (*pCurrentROMol)[*atBegin]; Thanks. Yingfeng On Wed, Dec 12, 2018 at 10:21 AM Yingfeng Wang wrote: > Greg, > > I figure out the problem. Removing "->get()" can solve the problem. > > Here is th