From: Noel O'B. <bao...@gm...> - 2007-08-30 07:02:55
|
According to the OB API, OBMol.SetTotalMultiplicity() works as follows: "Set the total spin multiplicity of this molecule to spin (i.e., 0 = singlet (default), 1 = doublet, 2 = triplet, etc.)" But shouldn't a singlet have a multiplicity of 1, triplet have multiplicity of 3. See for example: http://qcl.theochem.tu-muenchen.de/qcl/help/multiplicity_e.html Is this just an error in the docs? Noel |
From: Andrew D. <da...@da...> - 2007-08-30 13:03:29
|
> According to the OB API, OBMol.SetTotalMultiplicity() works as > follows: > "Set the total spin multiplicity of this molecule to spin (i.e., 0 = > singlet (default), 1 = doublet, 2 = triplet, etc.)" The code says //Jan 05 Implicit valency now left alone; use spin multiplicity for impl icit Hs int mult = atom->GetSpinMultiplicity(); if(mult==2) //radical hcount-=1; else if(mult==1 || mult==3) //carbene hcount-=2; else if(mult>=4) // as in CH, C etc hcount -= mult-1; if (hcount < 0) hcount = 0; if (hcount) { vhadd.push_back(pair<OBAtom*,int>(atom,hcount)); count += hcount; } } and //if there are any explicit Hs on an atom, except if their _isotope!=0, //then they consitute all the Hs. //Any discrepancy with the expected atom valency is because it is a radical of some sort. //So SMILES CC[2H] is interpreted as CH3CH2D; CC[H] is methyl carbene. for (atom = BeginAtom(k);atom;atom = NextAtom(k)) { if ((!atom->IsHydrogen() && atom->ExplicitHydrogenCount (true)!=0)//exclu de D,T || atom->HasNoHForced()) { diff=atom->GetImplicitValence() - (atom->GetHvyValence() + atom->Exp licitHydrogenCount()); if (diff) atom->SetSpinMultiplicity(diff+1);//radicals =2; all carbenes =3 } } Andrew da...@da... |
From: Chris M. <c.m...@ds...> - 2007-08-30 14:42:48
|
Noel O'Boyle wrote: > According to the OB API, OBMol.SetTotalMultiplicity() works as follows: > "Set the total spin multiplicity of this molecule to spin (i.e., 0 = > singlet (default), 1 = doublet, 2 = triplet, etc.)" > But shouldn't a singlet have a multiplicity of 1, triplet have > multiplicity of 3. This is for OBMol and is actually the number of unpaired electrons. Even more confusing, for OBAtom: //! \return the atomic spin, e.g., 0 (default) for singlet, //! 2 for radical 1 or 3 for carbene int GetSpinMultiplicity() const { return(_spinmultiplicity); } which is the same as the quantity "Radical" in MDL mol file Property block. Both of them are mis-named and should really be regarded as conventions. The atom version reflects hydrogen deficiency as well as spin, and really should have been called something like "radical" (my fault). Perhaps for OBMol we should have a GetHighSpinMultiplicity() and SetHighSpinMultiplicity() with default=1, doublet=2, triplet=3, and deprecate GetTotalMultiplicity() and SetTotalMultiplicity(). Chris |
From: Noel O'B. <bao...@gm...> - 2007-08-30 15:07:20
|
On 30/08/2007, Chris Morley <c.m...@ds...> wrote: > Noel O'Boyle wrote: > > According to the OB API, OBMol.SetTotalMultiplicity() works as follows: > > "Set the total spin multiplicity of this molecule to spin (i.e., 0 = > > singlet (default), 1 = doublet, 2 = triplet, etc.)" > > But shouldn't a singlet have a multiplicity of 1, triplet have > > multiplicity of 3. > > This is for OBMol and is actually the number of unpaired electrons. If this is true, then there must be a bug in the Gaussian output file writer. If you use "SetTotalSpinMultiplicity" to set the value to X, then this value of X is used by the Gaussian output file writer as the multiplicity. >>> import pybel >>> a = pybel.Molecule() >>> a.OBMol.SetTotalSpinMultiplicity(1) >>> a.write("gau") '#Put Keywords Here, check Charge and Multiplicity.\n\n \n\n0 1\n\n' >>> a.OBMol.SetTotalSpinMultiplicity(2) >>> a.write("gau") '#Put Keywords Here, check Charge and Multiplicity.\n\n \n\n0 2\n\n' Here "0 2" means charge of 0 and multiplicity of 2. For your regular molecules, a multiplicity of 1 is generally used (singlet). The multiplicity boils down to the number of unpaired electrons + 1. I would rather see the documentation (and internal code) changed to reflect this, rather than changing the Gaussian code (and perhaps others) to conform to a misleading convention. (Then again, I probably won't be the person doing the changing, so ...) > Even more confusing, for OBAtom: > > //! \return the atomic spin, e.g., 0 (default) for singlet, > //! 2 for radical 1 or 3 for carbene > int GetSpinMultiplicity() const { return(_spinmultiplicity); } > which is the same as the quantity "Radical" in MDL mol file Property block. > > Both of them are mis-named and should really be regarded as conventions. > The atom version reflects hydrogen deficiency as well as spin, and > really should have been called something like "radical" (my fault). > > Perhaps for OBMol we should have a GetHighSpinMultiplicity() and > SetHighSpinMultiplicity() with default=1, doublet=2, triplet=3, and > deprecate GetTotalMultiplicity() and SetTotalMultiplicity(). I don't understand why you would need to introduce a high/low spin method. The molecule either has a particular multiplicity or it doesn't. As I said, I'm all for redefining the current method to avoid needless confusion. So as I see it, there are three reasonable options: (1) do nothing, but need to fix various parsers that didn't read the documentation for SetTotalSpinMultiplicity() (2) change the name of SetTotalSpinMultiplicity() to SetTotalUnpairedElectrons(), and fix the parsers as for (1) (3) keep the name, change the docs to adhere to convention, and fix internal code to use multiplicity instead of number of unpaired electrons Noel > Chris > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-Devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > |