[MMTK] getting informations from universe
Ramon Crehuet
rcrehuet at gmail.com
Fri Mar 16 15:07:17 UTC 2007
Hi,
I think what you have to do is:
objectlist = universe.objectList()
for object in objectlist:
is_water = object.name
if is_water == 'water':
for atom in object.atomList():
print atom, atom.position(), atom.charge()
Cheers,
Ramon
2007/3/16, Davide Ricci <phd.davide.ricci at gmail.com>:
> Dear all,
> I need to get some informations out from the universe. For example, in a
> universe containing some molecules and some solvent molecules, I need to
> extract all the informations for each solvent molecule (charge and atom
> positions of each atom in the solvent molecules). What I'm doing, is get
> the objectList() from my universe, and selecting only the solvent molecules
> :
>
> objectlist = universe.objectList()
> for object in objectlist:
> is_water = object.name
> if is_water == 'water':
>
>
> Now the question is....How I can get the charge and positions of each atom
> in the solvent molecule ?
>
> Bests
> Davide
>
> _______________________________________________
> mmtk maillist - mmtk at starship.python.net
> http://starship.python.net/mailman/listinfo/mmtk
>
>
More information about the mmtk
mailing list