Output of charge to sdf file or inchi

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Output of charge to sdf file or inchi

David van der Spoel
Hi,

I am reading a lot of Gaussian output files and added the following line
to src/formats/gaussformat.cpp:

     mol.SetTotalCharge(total_charge);
where total_charge is extracted from the log file.

However, this is not printed to a .sdf file if I generate one, and not
either to an InChI, e.g. using:

% obabel -ig09 1-butyl-3-methylimidazolium-g4.log.gz -o inchi
InChI=1S/C8H15N2/c1-3-4-5-10-7-6-9(2)8-10/h6-8H,3-5H2,1-2H3
1 molecule converted

Any idea what code I should check to implement this?

Cheers,
--
David van der Spoel, Ph.D., Professor of Biology
Head of Department, Cell & Molecular Biology, Uppsala University.
Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.
http://www.icm.uu.se

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output of charge to sdf file or inchi

Geoff Hutchison
I am reading a lot of Gaussian output files and added the following line to src/formats/gaussformat.cpp:
   mol.SetTotalCharge(total_charge);

I'd make sure this isn't run before the EndModify call. But I'm confused, because the code already does this:

    mol.SetTotalCharge(total_charge);
    mol.SetTotalSpinMultiplicity(spin_multiplicity);

    mol.SetTitle(title);
    return(true);

-Geoff


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Loading...