Feature Requests item #2871242, was opened at 2009-10-01 10:52
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428743&aid=2871242&group_id=40728

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: gaussian format: partial charges

Initial Comment:
Hi,

It seems that babel is well capable of reading in gaussian calculated Mulliken 
charges. However, charges provided by more sophisticated algorithms (opt=mk for 
example) are not read even if they are calculated. Including support for better 
partial charges would make sense because Mulliken charges typically don't make 
any sense.

Quick look in the gaussformat.cpp shows that only Mulliken charges are 
interpreted. I tested a bit, and adding the following code after Mulliken code, 
should do the trick (same code as for Mulliken with small changes):

        else if(strstr(buffer,"Charges from ESP fit") != NULL )
          {
            hasPartialCharges = true;
            ifs.getline(buffer,BUFF_SIZE);      // column headings
            ifs.getline(buffer,BUFF_SIZE);      // column headings
            ifs.getline(buffer,BUFF_SIZE);
            tokenize(vs,buffer);
            while (vs.size() >= 3 &&
                   strstr(buffer,"------------------------------------------") 
== NULL)
              {
                atom = mol.GetAtom(atoi(vs[0].c_str()));
                if (!atom)
                  break;
                atom->SetPartialCharge(atof(vs[2].c_str()));

                if (!ifs.getline(buffer,BUFF_SIZE)) break;
                tokenize(vs,buffer);
              }
          }

In addition, one needs to add a correct value for the pair data that is set 
later in the code.

I hope that this comment is useful.

Regards,

Tapani Kinnunen (takinnun at hotmail.com)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428743&aid=2871242&group_id=40728

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to