New user interface features

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

New user interface features

Chris Morley-3
A few new user-interface features have been added, some in
response to requests from Chris Swain and Rajarshi Guha.
The aim is to extend the range of OpenBabel's housekeeping
capabilities. Scripting or database methods will always be
more versatile but OpenBabel's built-in interface might be
easier. These changes are now in CVS and will be in future
snapshots.

(1) A property (as in sdf files) can be added:

    babel infile.xxx outfile.sdf --property MeltingPoint 7C

The property name must have no spaces and a value (which
can have spaces) must be provided. If there is an existing
property of the same name its value is modified. CML
format also now optionally reads and writes these properties.

(2) You can replace the title of the molecule with --title
or append some text to it using --addtotitle:

    babel infile.xxx outfile.sdf --addtotitle _REVISED

If multiple molecules are converted, then these options
are applied to all of them.

(3) The output file can now be the same as an input file. So
you can now make the hydrogens in a file implicit by:

    babel myfile.sdf myfile.sdf -d

or add extra molecules to a file:

    babel mainfile.sdf extramols.sdf mainfile.sdf

(4) Using the -C option, features of molecules with the
same title in various input files can be combined. So if a
file Mols0D.sdf had some molecules with no atom
coordinates, and a file Mols.xyz had the coordinates,

   babel Mols0D.sdf Mols.xyz out.sdf -C

would produce a file with the structure with coordinates
and the sdf properties.

All the molecules in the first file are converted in this
way; molecules with other titles in input files other than
the first are not output. For example, the new 'therm'
format reads and writes molecular thermodynamic data in
NASA polynomial format. This venerable format contains a
molecular name and formula but no chemical structure. If
we have a SMILES file containing the stuctures of the
molecules we are interested in, and a thermodynamic
database, we can output a CML file of the relevant
molecules with structure and thermodynamics combined:

    babel mymols.smi database.therm combmols.cml -C

There would be performance issues with more than a few
hundred molecules in the database, but I'm working on that.

(5) To help select the molecule you want when using the -C
option, I have resurrected the title format (actually with
.txt extension). The first file would have a list of
molecule names which, with the option -at, can contain
spaces. When used for output each name is put on a
separate line.















-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: New user interface features

Mathias W.
Chris Morley wrote:
> A few new user-interface features have been added, some in
> response to requests from Chris Swain and Rajarshi Guha.
> The aim is to extend the range of OpenBabel's housekeeping capabilities.
> Scripting or database methods will always be more versatile but
> OpenBabel's built-in interface might be easier. These changes are now in
> CVS and will be in future snapshots.

> (2) You can replace the title of the molecule with --title
> or append some text to it using --addtotitle:
>
>    babel infile.xxx outfile.sdf --addtotitle _REVISED

Does this feature work with all molecule file formats that support
titles (e.g. mol2) or only with sdf (all your examples use sdf)?

Mathias


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: New user interface features

Chris Morley-3
Mathias Weigt wrote:

> Chris Morley wrote:
>
>>A few new user-interface features have been added, some in
>>response to requests from Chris Swain and Rajarshi Guha.
>>The aim is to extend the range of OpenBabel's housekeeping capabilities.
>>Scripting or database methods will always be more versatile but
>>OpenBabel's built-in interface might be easier. These changes are now in
>>CVS and will be in future snapshots.
>
>
>>(2) You can replace the title of the molecule with --title
>>or append some text to it using --addtotitle:
>>
>>   babel infile.xxx outfile.sdf --addtotitle _REVISED
>
>
> Does this feature work with all molecule file formats that support
> titles (e.g. mol2) or only with sdf (all your examples use sdf)?
>
It works at the internal OBMol level, so that the change
should be apparent on output of any format which has
titles. It seems to work with mol2.

The --property feature works internally on an OBPairData
object attached to an OBMol. As far as I know only sdf and
(now)cml files can handle this kind of data at present,
which is why I was fixated with sdf.

Chris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss