Re: [Open Babel] Weighted-rotor search
> mol = openbabel.OBMol() > cv = openbabel.OBConversion() > cv.SetInAndOutFormats('smi', outfile_type) > cv.ReadString(mol, smiles_string) > mol.AddHydrogens() > ff = openbabel.OBForceField.FindForceField("MMFF94") # so far this has done nothing ff.SteepestDescent(1500, 1.0e-4) ff.WeightedRotorSearch(250, 25) ff.ConjugateGradients(2500, 1.0e-6) # now we've updated the coordinates internal to the ff object > ff.GetCoordinates(mol) Hope that helps, -Geoff --- Prof. Geoffrey Hutchison Department of Chemistry University of Pittsburgh tel: (412) 648-0492 email: geo...@pitt.edu web: http://hutchison.chem.pitt.edu/ -- 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
[Open Babel] Fwd: OB writing non-standard atom types?
Just to follow up on this, can someone please try to replicate the problem for me using the attached files? - Forwarded message from dhous...@staffmail.ed.ac.uk - Date: Fri, 29 Jun 2012 16:50:03 +0100 From: Douglas Houston Subject: [Open Babel] OB writing non-standard atom types? To: openbabel-discuss@lists.sourceforge.net Hi all, I've been trying to convert the attached in.pdb file to .mol2 format. I happened to be using the -p option: babel -ipdb in.pdb -omol2 out_p.mol2 -p 7.4 This produces a file that babel chokes on if used as input: babel -imol2 out_p.mol2 -opdb == *** Open Babel Warning in Translate Cannot perform atom type translation: table cannot find requested types. == *** Open Babel Warning in ReadMolecule This Mol2 file is non-standard. Problem with molecule: in.pdb Cannot interpret atom types correctly, instead attempting to interpret atom type: C.cat1490 as elements instead. == *** Open Babel Warning in Translate Cannot perform atom type translation: table cannot find requested types. Atom 1 in the mol2 file has been assigned as type C.cat, which presumably is causing the problem. This atom is assigned type C.2 if I use the following command: babel -ipdb in.pdb -omol2 out_h.mol2 -h Is it that babel expects a space between the C.cat and the 1490? If so, that still doesn't explain why I get different atom type assignments using -p vs. -h. I know I can't use -p if I want the charges in the output to be sensible (I assign them separately later), but it's now looking like the -p option will also change atom types ... Is it simply that the -p option is fully broken and I should just stop using it? cheers, Doug _ Dr. Douglas R. Houston Lecturer Room 3.23 Institute of Structural and Molecular Biology Michael Swann Building King's Buildings University of Edinburgh Edinburgh, EH9 3JR, UK Tel. 0131 650 7358 -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - End forwarded message - _ Dr. Douglas R. Houston Lecturer Room 3.23 Institute of Structural and Molecular Biology Michael Swann Building King's Buildings University of Edinburgh Edinburgh, EH9 3JR, UK Tel. 0131 650 7358 -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. in.pdb Description: x-unknown/pdb out_p.mol2 Description: Binary data out_h.mol2 Description: Binary data -- 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
Re: [Open Babel] (no subject)
> I think I'm using the latter and other hydrogens are added, but not the one I > mentioned. Using version 2.3. Ah. I just looked through the gen3d code to see why this is happening: > pmol->AddHydrogens(false, true); // Add some hydrogens before running MMFF So if you're using code, you want to run gen3d and *then* add hydrogens again to re-protonate the OH with existing versions of libopenbabel. I'm not sure if this is the appropriate default for gen3d, since it might violate the principle of least surprise. (Certainly it surprised you.) Thoughts? Should the default gen3d use the pH model corrections for adding hydrogens? -Geoff -- 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
Re: [Open Babel] (no subject)
I think I'm using the latter and other hydrogens are added, but not the one I mentioned. Using version 2.3. Best Regards, James -Original Message- From: Chris Morley [mailto:c.mor...@gaseq.co.uk] Sent: 13 July 2012 14:52 To: James Jack Cc: openbabel-disc...@lists.sf.net Subject: Re: [Open Babel] (no subject) On 11/07/2012 18:51, James Jack wrote: > > When I convert this to a 3D molfile with "add explicit H" checked in > the OpenBabel GUI or I try the same in code the OH seems to become O- > (O with a negative charge). > In the GUI you need to check "Add hydrogens (make explicit)" but have the editbox labelled "Add hydrogens appropriate for this pH" on the next line empty. In code something like pMol->AddHydrogens(false, false); But this may not be necessary. If you use "Generate 3D coordinates" in the GUI or something like OBOp* pOp = OBOp::FindType("gen3D"); if(pOp) pOp->Do(pMol); in code, explicit hydrogens are added automatically. Chris Accelrys Limited (http://accelrys.com) Registered office: 334 Cambridge Science Park, Cambridge, CB4 0WN, UK Registered in England: 2326316 -- 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