[Rdkit-discuss] Removing hydrogen atoms without neighbors

2021-01-20 Thread Navid Shervani-Tabar
Dear all, I was wondering if there is a function to remove "hydrogen atoms without neighbors" from the mol object. Thanks! Regards, Navid ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net

Re: [Rdkit-discuss] Molecular weight function

2021-01-11 Thread Navid Shervani-Tabar
One more question. Is the unit for this function in Daltons? Regards, Navid On Wed, Apr 8, 2020 at 10:00 PM Navid Shervani-Tabar wrote: > Thank you! > > Navid > > On Wed, Apr 8, 2020 at 9:47 PM Peter S. Shenkin wrote: > >> It is probably best to say that it is t

[Rdkit-discuss] Polar surface area unit

2021-01-08 Thread Navid Shervani-Tabar
Dear RDKiters, I was wondering what is the unit for the calculated polar surface area using the "Descriptors.TPSA" function. Thanks, Navid ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net

Re: [Rdkit-discuss] Problem with Drawing a molecule

2020-11-16 Thread Navid Shervani-Tabar
It turns out I was simply cropping the third line out when using MolsToGridImage. Thanks again, Navid On Mon, Nov 16, 2020 at 4:28 PM Navid Shervani-Tabar wrote: > Dear RDKit users, > > I'm trying to plot a single molecule using RDKit. I use the following code > > from rdkit.C

[Rdkit-discuss] Problem with Drawing a molecule

2020-11-16 Thread Navid Shervani-Tabar
Dear RDKit users, I'm trying to plot a single molecule using RDKit. I use the following code from rdkit.Chem import Draw from rdkit import Chem mol = Chem.MolFromSmiles('C1#CN2C1C2') Chem.rdmolops.SanitizeMol(mol) img = Draw.MolsToGridImage([mol], molsPerRow=1) img.save(res_dir +

Re: [Rdkit-discuss] Automatic conformation assignment

2020-09-16 Thread Navid Shervani-Tabar
Thanks for the detailed response! Best, Navid On Wed, Sep 16, 2020 at 4:49 AM Téletchéa Stéphane < stephane.teletc...@univ-nantes.fr> wrote: > Le 16/09/2020 à 06:34, Navid Shervani-Tabar a écrit : > > Thanks, Stéphane! Can you by any chance point me to an example with e

[Rdkit-discuss] Automatic conformation assignment

2020-09-15 Thread Navid Shervani-Tabar
Dear RDKiters, I was wondering if RDKit can assign conformation type for molecules such as alanine dipeptide based on their dihedral angles/atom positions. If not, any software/package suggestions would be appreciated. Best, Navid ___ Rdkit-discuss

[Rdkit-discuss] Removing disconnected hydrogens

2020-06-09 Thread Navid Shervani-Tabar
Hello RDKitters, I'm using a function to convert a molecular graph to RDKit's mol object. Input molecules have a maximum size of N atoms. Molecules with less than N atoms have dummy atoms on the corresponding node. Currently, I use hydrogen as the dummy atom when building the editable RWmol

Re: [Rdkit-discuss] Molecular weight function

2020-04-08 Thread Navid Shervani-Tabar
e natural > fractional abundance of the isotope. > > For some elements, this is not terribly well defined, because for those > elements, the isotopic composition varies considerably with origin. > > -P. > > On Wed, Apr 8, 2020 at 4:35 PM Navid Shervani-Tabar > wrot

[Rdkit-discuss] Molecular weight function

2020-04-08 Thread Navid Shervani-Tabar
Hello, I was wondering if the word "average" in the following function and description: rdkit.Chem.Descriptors.MolWt(**x*, ***y*) The average molecular weight of the molecule is referring to average

Re: [Rdkit-discuss] Installing related issues

2020-04-01 Thread Navid Shervani-Tabar
:31 PM Greg Landrum wrote: > That isn’t the python that comes from your conda environment > > On Wed, 1 Apr 2020 at 16:58, Navid Shervani-Tabar > wrote: > >> Here are the outputs: >> >> (Navid_env) [nshervan@qa-v100-004 ~/Private/Research/Scattering-VAE ]which

Re: [Rdkit-discuss] Installing related issues

2020-04-01 Thread Navid Shervani-Tabar
et the python from your environment when you do > "python3 main.py"? > > Please try these two commands: > > which python3 > python3 -c "from rdkit import Chem;print(Chem.__file__)" > > > > On Tue, Mar 31, 2020 at 11:17 PM Navid Shervani-Tabar > wrote: &g

[Rdkit-discuss] Installing related issues

2020-03-31 Thread Navid Shervani-Tabar
Hello RDKiters, I have been using rdkit on my laptop for a while. I was trying to install it on my remote repository using conda-forge. It looks like I was able to install it but I still get the following error (Navid_env) [*@crcfe01 ~/Private/Research/code ] conda install -c conda-forge

Re: [Rdkit-discuss] RDKit upgrade issue

2020-01-23 Thread Navid Shervani-Tabar
these be the same? Thanks, Navid On Thu, Jan 23, 2020 at 12:07 PM Paolo Tosco wrote: > Hi Navid, > > try adding > > import rdkit.Chem.Descriptors > > before attempting to use MolWt. > > Cheers, > p. > On 23/01/2020 17:02, Navid Shervani-Tabar wrote: > >

Re: [Rdkit-discuss] RDKit upgrade issue

2020-01-23 Thread Navid Shervani-Tabar
Update: I was able to go back to square one. Using RDKit-2019.09.3.0 I still get the error module 'rdkit.Chem' has no attribute 'Descriptors' when using Chem.Descriptors.MolWt. Navid On Thu, Jan 23, 2020 at 9:37 AM Navid Shervani-Tabar wrote: > Hello, > > I was trying to use

[Rdkit-discuss] RDKit upgrade issue

2020-01-23 Thread Navid Shervani-Tabar
Hello, I was trying to use the MolWt function in RDKit. I tried Chem.Descriptors.MolWt but I got module 'rdkit.Chem' has no attribute 'Descriptors' I thought that might be related to the fact that I used the 2019.03 version. So I updated using conda install -c conda-forge rdkit But now when I

Re: [Rdkit-discuss] Getting 3d coordinates from mol object

2019-10-23 Thread Navid Shervani-Tabar
Sorry for spamming, sent to wrong mailing list. On Wed, Oct 23, 2019 at 7:50 PM Navid Shervani-Tabar wrote: > Hello, > > I'm trying to use OB to do some calculation related to the force fields. I > am using QM9 dataset and reading xyz files provided in the original paper. > >

[Rdkit-discuss] Getting 3d coordinates from mol object

2019-10-23 Thread Navid Shervani-Tabar
Hello, I'm trying to use OB to do some calculation related to the force fields. I am using QM9 dataset and reading xyz files provided in the original paper. def xyz_to_smiles(fname: str) -> str: mol = next(pybel.readfile("xyz", fname)) smi = mol.write(format="smi") return

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Navid Shervani-Tabar
, 2019 at 10:53 AM Greg Landrum wrote: > > Given that those molecules are not chemically reasonable, I would suggest > either fixing them by hand or removing them. > > On Wed, 23 Oct 2019 at 16:46, Navid Shervani-Tabar > wrote: > >> Thanks Dan, >> >> The

Re: [Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-23 Thread Navid Shervani-Tabar
< dan.nealschnei...@schrodinger.com> wrote: > Navid- > You probably need to "sanitize" the mol: > > rdkit.Chem.rdmolops.SanitizeMol(mol) > > *dan nealschneider* | senior developer > [image: Schrodinger Logo] <https://www.schrodinger.com/> > > > On Tue, O

[Rdkit-discuss] Problem with getting hybridization from mol object

2019-10-22 Thread Navid Shervani-Tabar
Hello, I am trying to load a dataset using a vector of atoms (e.g [6,6,7,6,6,8]) and the corresponding adjacency matrix. I am using the following script to transform these into a mol object: def MolFromGraphs(node_list, adjacency_matrix): # create empty editable mol object mol =

[Rdkit-discuss] Problems with SMILES using MolFromSmiles

2019-09-24 Thread Navid Shervani-Tabar
Hello, I have noticed that RDKit have some problems with some SMILES when trying to use MolFromSmiles. With further attention, I have noticed that all of these SMILES include nitrogen atoms. Some examples include: [NH3]CCC(=O)[O] NC(=[NH2])C(=O)[O] NC(=[NH2])[CH2].C(=O)=O CNC(=[NH2])C(=O)[O]

Re: [Rdkit-discuss] GetAngleDeg alternative for the case of no conformation

2019-09-23 Thread Navid Shervani-Tabar
i, 20 Sep 2019 at 20:16, Navid Shervani-Tabar > wrote: > >> Hello, >> >> Couple weeks ago, I asked if there is an RDKit based method that can give >> the distance between two atoms between the molecule. The solution that I >> got was: >> >> f

[Rdkit-discuss] GetAngleDeg alternative for the case of no conformation

2019-09-20 Thread Navid Shervani-Tabar
Hello, Couple weeks ago, I asked if there is an RDKit based method that can give the distance between two atoms between the molecule. The solution that I got was: from rdkit.Chem import AllChem mol = Chem.MolFromSmiles('O=CC1OC12CC1OC12') AllChem.EmbedMolecule(mol) conf = mol.GetConformer()

Re: [Rdkit-discuss] Question on chirality

2019-09-15 Thread Navid Shervani-Tabar
rdkit.Chem import AllChem > >>> AllChem.EmbedMolecule(mol) > 0 > >>> Chem.AssignAtomChiralTagsFromStructure(mol) > >>> Chem.FindMolChiralCenters(mol) > [(1, 'S')] > >>> > > > Another way would be if you can get isomeric SMIL

[Rdkit-discuss] Question on chirality

2019-09-11 Thread Navid Shervani-Tabar
Hello, In the paper: "Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals", authors introduce chirality as an atom feature input to analyze QM9 dataset. I was trying to recreate this atom feature as following > Chirality: (categorical) R, S, or not a Chiral center

[Rdkit-discuss] Ring size

2019-09-10 Thread Navid Shervani-Tabar
Hello all, I am interested in counting the number of rings that an atom is participating in. I would like to separate these by the size of the ring. So, for instance, in 'CC12CCC1CC2', I would like to know how many rings of size (3-7) does the atom 'C' with index 1 participate in. The answer here

Re: [Rdkit-discuss] Euclidean distance between atoms using RDKit

2019-09-05 Thread Navid Shervani-Tabar
On Wed, Sep 4, 2019 at 7:28 PM Navid Shervani-Tabar wrote: > Thanks Omar, That indeed fix the problem. > > Navid > > On Wed, Sep 4, 2019 at 7:15 PM Omar H94 wrote: > >> Dear Navid, >> You need to embed your molecule to have a 3D conformation. >> Try: >>

Re: [Rdkit-discuss] Euclidean distance between atoms using RDKit

2019-09-04 Thread Navid Shervani-Tabar
dMolecule(mol) > conf = mol.GetConformer() > at1Coords = np.array(conf.GetAtomPosition(1)) > at2Coords = np.array(conf.GetAtomPosition(2)) > print(np.linalg.norm(at2Coords - at1Coords)) > > I hope this works for you. > Best regards, > Omar > > On Thu, Sep 5, 2019 a

[Rdkit-discuss] Euclidean distance between atoms using RDKit

2019-09-04 Thread Navid Shervani-Tabar
Hello, I'm trying to find the Euclidean distance between two atoms in the molecule with SMILES representation `O=CC1OC12CC1OC12` using the `rdkit` package. Looking online, I have converged to the following code. import numpy as np from rdkit import Chem mol =

[Rdkit-discuss] Question regarding Chemical Features module on RDKit

2019-08-28 Thread Navid Shervani-Tabar
Hello, I have a question regarding Chemical Features module on RDKit. I realized that for molecule with SMILES representation "OC1CC1O" from QM9 dataset, using the code fdefName = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef') factory = ChemicalFeatures.BuildFeatureFactory(fdefName) mol =

[Rdkit-discuss] SMILES to graphs

2019-07-16 Thread Navid Shervani-Tabar
Hello, I was wondering if it is possible to generate graph representations from SMILES using RDkit package. Thanks, Navid ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

[Rdkit-discuss] Error from qed

2019-07-03 Thread Navid Shervani-Tabar
Hello, I was trying to find quantitative estimation of drug-likeness (QED) for qm9 dataset. qm9 dataset provides a graph representation of the molecule, these are translated into mol objects and then qed is estimated. ``` from rdkit.Chem.QED import qed . . . mol = Graphs2Mol(node, adj_mat)