[Open Babel] Converting PDB to SMILES and matching atom orders

2016-08-31 Thread Sam Tonddast-Navaei
I am trying to read a small molecule from PDB file and match its atom numbers to the same molecule in a SDF file. I have tried both matching SMART patterns and using OBIsomorphismMapper, both work for 70% of cases. However there are cases for which OpenBabel can not simply get the right SMILES from

Re: [Open Babel] Converting PDB to SMILES and matching atom orders

2016-08-31 Thread Sam Tonddast-Navaei
al SMILES from the ligand repository at the > PDB and use that for your analysis. > > Best, > > S > > > > On 08/31/2016 01:51 PM, Sam Tonddast-Navaei wrote: > >> I am trying to read a small molecule from PDB file and match its atom >> numbers to the s

Re: [Open Babel] Converting PDB to SMILES and matching atom orders

2016-08-31 Thread Sam Tonddast-Navaei
ng of 1st->16th, 2nd -> 15th. > > Hopefully the attached script gives an idea of how to incorporate this > idea into your code. > > > On Wed, Aug 31, 2016 at 4:51 PM, Sam Tonddast-Navaei > wrote: > >> I am trying to read a small molecule from PDB file and matc

[Open Babel] loss of stereochemistry after protonization

2016-09-14 Thread Sam Tonddast-Navaei
Hello, I am trying to adjust the protonization based on the PH for a given molecule and I am using pybel and openbabel for python. I am using the following code: >>> mol = pybel.readstring('smi', 'C1=CC=C(C=C1)C[C@H](C(=O)[O-])[NH3+]') > >>> len(mol.atoms) > 16 > >>> mol.OBMol.AddHydrogens(True,

[Open Babel] BUG: Nitrogen chirality

2016-09-16 Thread Sam Tonddast-Navaei
Hello everyone, I was trying to filter through the SMILES with missing stereochemistry information. So I am using the below script to loop over the atoms and check if the atom is a chiral center and if so, is the stereochemistry information there or not. mol = pybel.readstring('smi', smi) >

Re: [Open Babel] BUG: Nitrogen chirality

2016-09-17 Thread Sam Tonddast-Navaei
mes all nitrogens can invert and are therefore > non-chiral. > > Would you be willing to upload this example as a SMILES or Mol to the > issue tracker for 2.4.1? > http://github.com/openbabel/openbabel/issues > > Thanks! > -Geoff > > > On Sep 16, 2016, at 6:28 PM

[Open Babel] Maintaining cis/trans after fragmentation

2016-11-19 Thread Sam Tonddast-Navaei
Hello all, I am trying to break a molecule into two fragments using Pybel yet keeping the cis/trans stereochemisty information at the cleavage point when I substitute it by a dummy atom. Currently I am trying to copy the bond property (IsUp or IsDown) and assign it to the new bonds (bonds assign

Re: [Open Babel] Maintaining cis/trans after fragmentation

2016-12-26 Thread Sam Tonddast-Navaei
k at the docs for OBStereoFacade and related classes. Stereo is stored > in a Config object with refs to the four IDs of the atoms connected to the > atoms of the double bond. > > On 19 Nov 2016 11:35 p.m., "Sam Tonddast-Navaei" > wrote: > >> Hello all, >&

Re: [Open Babel] Maintaining cis/trans after fragmentation

2016-12-26 Thread Sam Tonddast-Navaei
g, and then use >>> setconfig or something like this. >>> >>> On 26 Dec 2016 8:09 p.m., "Sam Tonddast-Navaei" >>> wrote: >>> >>>> Thanks Noel, I figured it out thanks to your hint. Is there a function >>>> that a

Re: [Open Babel] Maintaining cis/trans after fragmentation

2016-12-26 Thread Sam Tonddast-Navaei
4L) > OC.C(=CCl)F Could you please let me know if I am missing something and how I can update the SMILES? On Mon, Dec 26, 2016 at 3:41 PM, Sam Tonddast-Navaei wrote: > Hahaha, I actually do suck and still stuck :) > An example script is always helpful and I would really appreciate it i

Re: [Open Babel] Maintaining cis/trans after fragmentation

2016-12-26 Thread Sam Tonddast-Navaei
ng HasCisTransStereo(atom_index). Could anyone elaborate why is this the case? Thanks, Sam On Mon, Dec 26, 2016 at 5:08 PM, Sam Tonddast-Navaei wrote: > Hi Noel, > > I made this script: > > #!/usr/bin/python >> import pybel >> import openbabel as ob >> >> mo

Re: [Open Babel] Maintaining cis/trans after fragmentation

2016-12-28 Thread Sam Tonddast-Navaei
ol.AddBond(3, a.GetIdx(), 1) > > # Note that the refs uses atom Ids (4294967294 is used to mark an > implicit stereo ref) > config.refs = (a.GetId(), 4294967294, 4, 4294967294) > stereo.SetConfig(config) > > print mol.write('smi') # OC.C(=C\Cl)/F > > > On 27 Decembe

[Open Babel] Finding the largest induced subfragment

2017-06-20 Thread Sam Tonddast-Navaei
Hello all, Thank you in advance for taking your time and I hope to explain the problem well. I am trying to find the largest induced subfragment given two molecules. For example given ATP (Adenosine Triposphate) and Guanine, I would like the algorithm to return the Purine ring. I wrote a piece