Solvent box

Hi,

It is not clear to me how one would model, in Avogadro, a solvent (e.g.
water).

For instance, suppose I would like to have a cubic box willed with
decane molecules (C10H22). Note: not crystalline decane, but a liquid.
I have been trying to create a unit cell, and use the option “Fill Unit
Cell”, but this is only partly working: there do arise a fow more
molecules, but it looks all very buggy.Moreover, the bonds disappear!.

In particular:

  • Can Avogadro (or for that matter, the OB force field) handle periodic
    boundary conditions? Is this automatically done when there is a unit
    cell present?
  • Is there an efficient way to model many identical molecules? (e.g.
    like in a lquid)

Regards,
Bertwim

For instance, suppose I would like to have a cubic box willed with
decane molecules (C10H22). Note: not crystalline decane, but a liquid.

This has been a question for me – I’ve seen some other programs which allow you to add a solvent box (e.g., VMD), but little information on the feature. I asked a colleague who does MD simulations (including some with zeolites) and he suggested creating a library of pre-equilibrated solvent box systems for Avogadro.

If there are other codes which can create solvents at appropriate densities on-the-fly, I’d appreciate some pointers. I’ve come up empty. Pointers to journal articles or similar would be appreciated.

  • Can Avogadro (or for that matter, the OB force field) handle periodic
    boundary conditions?

No, not yet. Code contributions in this line would be significantly welcome. I don’t have the time to write the code.

  • Is there an efficient way to model many identical molecules? (e.g.
    like in a liquid)

No, there is no solvent replication, or effective fragment approaches.

Hope that helps,
-Geoff

Geoff,

Thanks for your comments.

I remember from a long time ago (~20years!, when I occasionally used the
Sybyl package) that you could model a solvent by providing a mol2-file
(describing a single molecule) and a so called box-file, which contained
the coordinates of the atoms involved, a reference to the corresponding
mol2-file, and the dimensions of the box. I have browsed the web, but I
dont see any reference to this file anymore, so I don’t know if this
still exists. Maybe there are some current Sybyl users that can shed
some light here.

Don’t go modelling of a solvent box and periodic boundary conditions
(with minimum image convention) always go together?
At the moment I’m trying to hookup my own MD code (which -optionally-)
has period boundary conditions for rectangular boxes as an extension to
Avogadro. It does work now, but it would be nice to have the PBC in
Avogadro. I don’t know the code of Avogadro or OpenBabel (the advantage
of writing a plugin…) but if there is a central place where the
distance between atoms is being calculated, this is perhaps not too
difficult. After all, the concept of a unit cell is there. Perhaps I
should put some effort in understanding the inner workings of
Avogadro/OpenBabel a bit more.

Regards,
Bertwim

Geoffrey Hutchison wrote:

For instance, suppose I would like to have a cubic box willed with
decane molecules (C10H22). Note: not crystalline decane, but a liquid.

This has been a question for me – I’ve seen some other programs which allow you to add a solvent box (e.g., VMD), but little information on the feature. I asked a colleague who does MD simulations (including some with zeolites) and he suggested creating a library of pre-equilibrated solvent box systems for Avogadro.

If there are other codes which can create solvents at appropriate densities on-the-fly, I’d appreciate some pointers. I’ve come up empty. Pointers to journal articles or similar would be appreciated.

  • Can Avogadro (or for that matter, the OB force field) handle periodic
    boundary conditions?

No, not yet. Code contributions in this line would be significantly welcome. I don’t have the time to write the code.

  • Is there an efficient way to model many identical molecules? (e.g.
    like in a liquid)

No, there is no solvent replication, or effective fragment approaches.

Hope that helps,
-Geoff

Bertwim,

dimensions of the box. I have browsed the web, but I dont see any reference to this file anymore, so I don’t know if this still exists. Maybe there are some current Sybyl users that can shed some light here.

I’m more familiar with the similar approach from VMD, which has a set of files with pre-equilibrated solvents.
http://www.ks.uiuc.edu/Research/vmd/plugins/solvate/

Don’t go modelling of a solvent box and periodic boundary conditions (with minimum image convention) always go together?

Yes. As you noted, we don’t have either of them supported in Avogadro yet.

It does work now, but it would be nice to have the PBC in Avogadro. I don’t know the code of Avogadro or OpenBabel (the advantage of writing a plugin…) but if there is a central place where the distance between atoms is being calculated, this is perhaps not too difficult. After all, the concept of a unit cell is there. Perhaps I should put some effort in understanding the inner workings of Avogadro/OpenBabel a bit more.

There are some places where the distance between atoms is calculated – or more accurately, atom pairs for distance calculations are added to an MM calculation. But this would also include vdW and other non-bonded interactions. It’s not impossible, but I haven’t had the time. I’d be glad to help point people to the right parts in Open Babel and work with them to complete this.

My main obstacle is knowing “how far” to go when adding interactions between neighboring unit cells. Do you look at the primitive unit cell plus the ~6 nearest neighbors?

Thanks,
-Geoff

I remember from a long time ago (~20years!, when I occasionally used the Sybyl package) that you could model a solvent by providing a mol2-file (describing a single molecule) and a so called box-file

In light of a recent discussion on the CCL mailing list, I think I’d like to suggest Packmol, which is also distributed under the GNU GPL.
http://www.ime.unicamp.br/~martinez/packmol/

This looks like an excellent tool for creating solvent boxes of arbitrary molecules, but also mixtures.

Cheers,
-Geoff

Yes, that would be a great idea.
A possible use case would e.g. be:

  1. Create a molecule in avogadro
  2. Use the extension to display a GUI element offering the options for
    packmol. -There are a few options, not too many.
  3. When the options are known, the packmol input file can we generated.
    Also, a (pdb)-file of the single molecule that needs to be "solvated"
    need to be written. Not sure how this should be done in Avogadro if you
    want to create a mixture.
  4. The packmol tool then needs to be fired off. This can take
    considerable time! At the end of the packmol, a pdb-file is written
    which then can be loaded back into Avogadro. (in fact, at intermediate
    stages as well, so it should be possible to follow the process)

Is this what you have in mind?

A question is, what next? The need for periodic boundary conditions,
discussed earlier in this thread I believe, rises again.
This all should be reconciled somehow with the existing functionality in
Avogadro, in particular the current use of the unit cell, which, I’m
afraid is a mystery to me how it works. I think I can contribute to
steps 1-4, but my knowledge about Avogadro internals is very limited.

Kind Regards,
Bertwim

Geoffrey Hutchison wrote:

Thanks for the reference. I tried the tool and indeed its works great, at least for the few cases I have tried.

Excellent. Do you think it would help to have an Avogadro extension which runs the tool? We already have a nice library of solvent molecules for input and could directly read the output back into Avogadro.

Thanks,
-Geoff

Is this what you have in mind?

Yes, exactly.

I think I can contribute to steps 1-4, but my knowledge about Avogadro internals is very limited.

Steps 1-4 would be greatly appreciated by many people. Packmol is easy to use, but of course, students (and others) may want a simple dialog.

A question is, what next? The need for periodic boundary conditions, discussed earlier in this thread I believe, rises again.

That’s my problem, right? I need to create support for periodic boundaries in the Open Babel force fields. I know the basics of how to do it, but it’s a matter of sitting down and doing the work:

  1. Need to check for a unit cell before setting up the force field calculations.
  2. If so, check if the space group calls for symmetric atoms.
  3. Replicate the atoms across neighboring unit cells.
  4. When moving atoms, consider if they move across a unit cell boundary.

And then, I need to do a lot of testing. :-_

Right now in Avogadro, the unit cell support is simply for display. It has no effect on calculations. We haven’t even gone far enough to send unit cells to computational packages that support them (e.g., Gaussian and MOPAC).

Hope that helps,
-Geoff

Hi,

On Thu, Feb 18, 2010 at 2:57 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

Is this what you have in mind?

Yes, exactly.

I think I can contribute to steps 1-4, but my knowledge about Avogadro internals is very limited.

Steps 1-4 would be greatly appreciated by many people. Packmol is easy to use, but of course, students (and others) may want a simple dialog.

I’m also interested in having a packmol extension. I have written down
some ideas on the wiki:

http://avogadro.openmolecules.net/wiki/To_Do_for_1.1

Feel free to contact me if there are other people who want to work on this.

A question is, what next? The need for periodic boundary conditions, discussed earlier in this thread I believe, rises again.

That’s my problem, right? I need to create support for periodic boundaries in the Open Babel force fields. I know the basics of how to do it, but it’s a matter of sitting down and doing the work:

  1. Need to check for a unit cell before setting up the force field calculations.
  2. If so, check if the space group calls for symmetric atoms.
  3. Replicate the atoms across neighboring unit cells.
  4. When moving atoms, consider if they move across a unit cell boundary.

And then, I need to do a lot of testing. :-_

Right now in Avogadro, the unit cell support is simply for display. It has no effect on calculations. We haven’t even gone far enough to send unit cells to computational packages that support them (e.g., Gaussian and MOPAC).

Adding periodic boundary conditions to OpenBabel is possible but would
require some work and a lot of testing. This has been requested before
though and I/we could always give it a try…

However, I personally don’t see the point of adding PBC to OpenBabel
as long as we keep a structure for all non-bonded interactions. This
just doesn’t scale. Once this is solved I would add a simple abstract
class which abstracts away the computation of non-bonded distances.
The implementation could just return the distance, the distance taking
PBC into account or use a neighborlist. The next step would be to
adjust the algorithms (minimizations) to translate molecules back in
the box if they get out.

Towards the future and OB 3.0, I think using OpenMM would be an
excellent option. By using OpenMM atom typing and parameter assignment
is still done in OB but the actual computational terms are provided by
OpenMM. This would allow us to have support for GPU hardware without
worrying to much about the low level stuff. An additional benefit
would be features like periodic boundary conditions, PME, … OpenMM
is still a young project and a fast CPU implementation doesn’t really
exist yet. There is the reference CPU implementation but this is
optimized for correctness. OpenCL might provide the solution for this
once there is a good OpenCL CPU implementation. There already is a
gromacs port that uses OpenMM although it only has one integrator
algorithm for MD and no minimization.

Cheers,
Tim

Hope that helps,
-Geoff

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss

Hi,

Tim Vandermeersch wrote:

Hi,

On Thu, Feb 18, 2010 at 2:57 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

Is this what you have in mind?

Yes, exactly.

I think I can contribute to steps 1-4, but my knowledge about Avogadro internals is very limited.

Steps 1-4 would be greatly appreciated by many people. Packmol is easy to use, but of course, students (and others) may want a simple dialog.

I’m also interested in having a packmol extension. I have written down
some ideas on the wiki:
http://github.com/timvdm/Avogadro-Packmol-Extension/blob/master/packmoldialog.ui
http://avogadro.openmolecules.net/wiki/To_Do_for_1.1

Feel free to contact me if there are other people who want to work on this.

I read through your suggestions. You obviously have given it more
thought than I did. For me, I would already be
happy, to start with that is, if I could do the basics: build one or
perhaps a few (different) molecules in Avogadro, and use
packmol to generate the solvent. I actually started to work on this but
had to switch topics because of other urgent priorities.

A question is, what next? The need for periodic boundary conditions, discussed earlier in this thread I believe, rises again.

That’s my problem, right? I need to create support for periodic boundaries in the Open Babel force fields. I know the basics of how to do it, but it’s a matter of sitting down and doing the work:

  1. Need to check for a unit cell before setting up the force field calculations.
  2. If so, check if the space group calls for symmetric atoms.
  3. Replicate the atoms across neighboring unit cells.
  4. When moving atoms, consider if they move across a unit cell boundary.

And then, I need to do a lot of testing. :-_

Right now in Avogadro, the unit cell support is simply for display. It has no effect on calculations. We haven’t even gone far enough to send unit cells to computational packages that support them (e.g., Gaussian and MOPAC).

Adding periodic boundary conditions to OpenBabel is possible but would
require some work and a lot of testing. This has been requested before
though and I/we could always give it a try…

However, I personally don’t see the point of adding PBC to OpenBabel
as long as we keep a structure for all non-bonded interactions. This
just doesn’t scale. Once this is solved I would add a simple abstract
class which abstracts away the computation of non-bonded distances.
The implementation could just return the distance, the distance taking
PBC into account or use a neighborlist. The next step would be to
adjust the algorithms (minimizations) to translate molecules back in
the box if they get out.

Yes, you are right. All these things come together. But in my view, the
usefulness of Avogadro would be greatly extended.
By the way, shouldn’t we use PBC (with minimum image convention) and
the use of a (verlet-)neighbour list?
On the abstracted distance function: yes, but I remember from the past
(yes, quite some time ago…) that this
had a significant performance penalty for an MD simulations. But maybe
the situation is better now.

Towards the future and OB 3.0, I think using OpenMM would be an
excellent option. By using OpenMM atom typing and parameter assignment
is still done in OB but the actual computational terms are provided by
OpenMM. This would allow us to have support for GPU hardware without
worrying to much about the low level stuff. An additional benefit
would be features like periodic boundary conditions, PME, … OpenMM
is still a young project and a fast CPU implementation doesn’t really
exist yet. There is the reference CPU implementation but this is
optimized for correctness. OpenCL might provide the solution for this
once there is a good OpenCL CPU implementation. There already is a
gromacs port that uses OpenMM although it only has one integrator
algorithm for MD and no minimization.

You make me curious about what this openMM, openCL entails. Is it only
about using the GPU
(which is still local) or are remote (massively parallel) compute
engines also covered?

Cheers,
Tim

Hope that helps,
-Geoff

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss