---
name: "obgen"
section: "1"
platform: "linux"
package: "openbabel"
version: "3.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/obgen"
---

# obgen(1)

generate 3D coordinates for a molecule

## NAME

**obgen** – generate 3D coordinates for a molecule

## SYNOPSIS

**obgen** \[*OPTIONS*\] *filename*

## DESCRIPTION

The **obgen** tool will generate 3D coordinates for molecules in a file (e.g. multi-molecule SMILES files). The resulting structure will be optimized using the given forcefield and checked for the lowest-energy conformer using a Monte Carlo search. Output will be sent to standard output in the SDF file format.

## OPTIONS

If no filename is given, **obgen** will give all options including the available forcefields.

- **-ff** *forcefield*

  Select the forcefield

## ENVIRONMENT

- OB\_RANDOM\_SEED

  Seed for pseudo random number generator; random seed is used if unset or null. This feature is effective if Open Babel is built with *-DOB\_USE\_OBRANDOMMT* cpreprocessor flag (will be automatically enabled when version 4 is released).

## EXAMPLES

View the possible options, including available forcefields:

```
obgen
```

Generate 3D coordinates for the molecule(s) in file test.smi:

```
obgen test.smi
```

Generate 3D coordinates for the molecule(s) in file test.smi using the UFF forcefield:

```
obgen -ff UFF test.smi
```

## SEE ALSO

[obabel(1)](/obabel/1.md), [obconformer(1)](/obconformer/1.md), [obminimize(1)](/obminimize/1.md).

The web pages for Open Babel can be found at: \<**https://openbabel.org/**\>

The web pages for Open Babel Molecular Mechanics can be found at: \<**https://openbabel.org/docs/Forcefields/Overview.html**\>

## AUTHORS

The obgen program was contributed by Tim Vandermeersch.

Open Babel is developed by a cast of many, including current maintainers Geoff Hutchison, Chris Morley, Michael Banck, and innumerable others who have contributed fixes and additions. For more contributors to Open Babel, see \<**https://openbabel.org/docs/Introduction/thanks.html**\>

## COPYRIGHT

Copyright (C) 2007-2008 by Tim Vandermeersch.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
