Constraint Optimization

Dear All
Avogadro has this nice feature of being able to carry out a force field
minimization on just a part of a structure (i.e. allowing selected atoms
to be fixed). Two questions on this:

  • What parts of the source code are responsible for this?
  • I understand, in the background there is a OpenBabel force field doing
    the minimization. I know I can use the OpenBabel force fields on the
    command line by calling $ obminimize [options]. Is it possible to do a
    constraint optimization on the command line too? How could I provide
    OBMinimize with the constraints?

The aim of all this is to be able to mutate a side chain in a protein
and then have the side chain be force field minimized to get rid of
steric clashes (in batch mode of course) before more sophisticated
calculations are carried out.

Thanks a lot for some hints on this.

Martin

  • What parts of the source code are responsible for this?

Well, there are interface parts in Avogadro, but the “background” part is all Open Babel. Avogadro just specifies the constraints and the forcefield, and OB takes over.

  • I understand, in the background there is a OpenBabel force field doing
    the minimization. I know I can use the OpenBabel force fields on the
    command line by calling $ obminimize [options]. Is it possible to do a
    constraint optimization on the command line too? How could I provide
    OBMinimize with the constraints?

The command-line obminimize program is intended mostly as an example which may meet ~70-80% of most users’ needs. There isn’t a command-line program for doing constrained optimization. It’s not hard to write one using obminimize.cpp as the starting point, but that’s really a question for the openbabel-devel mailing list.

The aim of all this is to be able to mutate a side chain in a protein
and then have the side chain be force field minimized to get rid of
steric clashes (in batch mode of course) before more sophisticated
calculations are carried out.

I’d certainly be interested in that code. I know a number of users who have asked about mutating residues in the Avogadro interface. Is this something you are willing to share?

Best regards,
-Geoff

Well, there are interface parts in Avogadro, but the “background” part is all Open Babel. Avogadro just specifies the constraints and the forcefield, and OB takes over.

Could you pin point me to the relevant API part of Avogadro?

I’d certainly be interested in that code. I know a number of users who have asked about mutating residues in the Avogadro interface. Is this something you are willing to share?

Sure, I’ll be happy to. As for now, I’ve been doing the mutations with
PyMOL.

Could you pin point me to the relevant API part of Avogadro?

Take a look at libavogadro/src/extensions/constraints* for the dialog, and most importantly the ConstraintsModel class. Right now, the ConstraintsModel handles adding/editing constraints nicely, but tells the forcefield about it:

m_forceField->SetConstraints(m_constraintsModel->constraints());

These are then used by the forcefieldextension when running “Optimize Geometry,” etc.

If you want a more detailed roadmap, let me know.

Best regards,
-Geoff