[MMTK] Charge attribute to Atom class

Konrad Hinsen research at khinsen.fastmail.net
Fri Aug 5 09:02:34 UTC 2011

On 5 Aug, 2011, at 9:57 , Aashish Jain wrote:

> MMTK has a class called "Atom" to generate atoms of desired properties.
> I want to add charge on each atom while I am generating them.
> Is it possible to do in a straightforward manner (like adding a parameter "charge" in the argument list of Atom)?
> For example, right now I add the radius attribute to the Atom by writing:
> Atom(element, radius=radius, name='B').
> Or is there any other way to add charges on the atom?

You can add a charge in the same way, but it's not called simply "charge", but "amber_charge" for the Amber force field, "opls_charge" for the OPLS force field, and "spce_charge" for the SPCE force field (for water).

You can also define a charge after an atom is created:

	atom = Atom('C')
	atom.amber_charge = 0.

Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research AT khinsen DOT fastmail DOT net

More information about the mmtk mailing list