Looks like a Builder bug. The stochastic issue is due to the use of a random vector in there. I don't think we should be using that.
Regarding gen3d versus Python code, gen3d does a forcefield optimisation after calling the Builder. You should look at its code, gen3d.cpp. - Noel On 16 September 2012 18:55, Чугунов Антон <batc...@yandex.ru> wrote: > Hello All! > I encounter a very strange problem when I convert peptides from smiles to > 3D. This problem persists for Phe and Tyr residues, but it's stochastic: it > appears approx. in one case in ten. The problem is that CB-CG-CD1 valence > angle is about 0 degrees, and the ring "folds back" to CB atom (see picture > and two PDB files). Here's the code: > > #!/usr/bin/python > import pybel, openbabel > Smiles = { > 'F': 'N[C@@H](CC1=CC=CC=C1)C(=O)', > 'I': 'N[C@@H]([C@@H](C)CC)C(=O)', > 'Y': 'N[C@@H](CC1=CC=C(C=C1)O)C(=O)' > } > seq = 'FIIFIIIYIIIIFIIY' > def make_3d(pep_seq): > pep_smiles = '' > for aa in pep_seq: > pep_smiles = pep_smiles + Smiles[aa] > pep = pybel.readstring("smi", pep_smiles) > openbabel.OBBuilder().Build(pep.OBMol)# Make 3D-coordinates > return pep > > for i in range(20): # This makes 20 different peptides > print i > pep = make_3d(seq) > pep.write('pdb', 'pep{:d}.pdb'.format(i), overwrite = True) > > This problem is still with me if I use a single Phe or Tyr residue; at the > same time, command line obabel tool does not seem to have this; at least > after 20 trials of obabel -:"N[C@@H](CC1=CC=CC=C1)C(=O)" -O pep${i}.pdb > --gen3d I didn't notice any problems. > Does anyone have idea, how to overcome this problem? Minimization corrects > this to some extent, but you'll still have different conformations of side > chains => there's no reproductivity in generated structures. > > Chugunov Anton. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss