[ase-users] Constrained center of mass (Elsebeth Schr?der)

Felix Hanke F.Hanke at liverpool.ac.uk
Mon Mar 7 12:19:46 CET 2011


Hi,
> Dear ASE users,
>
> I am looking at adsorbed molecules on a surface (at the moment using gpaw). I would like to include a constraint that fixes position of the center of mass of the molecule relative to the surface, or at least the center of mass of two of the atoms in the molecule.
I wrote such a script fairly recently, the code and an example is 
attached. The example takes a Cu slab with H2 in a very unphysical 
position and forces the slab to rearrange around the H-atoms such as to 
keep their CM constant. This should be a reasonably rigorous test for 
such a constraint. To explicitly make sure that the constraint is 
working, you need to run the example and open the trajectory output in 
ag. Plotting the following should confirm that the CM is conserved to 
within 1E-14 or so Angstrom in the y-direction:
i, 0.5*(R[65][1] + R[64][1])
and likewise for the other directions.

Hope this helps
Cheers,
Felix

> The (very) old dacapo version that had atomic position optimization imbedded in the dacapo code (i.e., before the optimization was lifted out into ASE) was able to do the latter and I wonder if this has also been included in ASE, or if anybody could help me how to write such a constraint. I have browsed the ASE documentation but didn't find anything that seemed useful.
>
> Elsebeth
>
> =====================================================================
> Elsebeth Schr?der, prof.
> Dept. of Microtechnology and         tel.:   +46 31 772 8424
> Nanoscience (MC2)                    fax:    +46 31 772 3471
> Chalmers Univ. of Technology         e-mail: schroder at chalmers.se
> SE-412 96 Gothenburg, Sweden         http://fy.chalmers.se/~schroder
> =====================================================================
>

-- 
-----------------------------------------
Felix Hanke
The Surface Science Research Centre
The University of Liverpool
Liverpool, L69 3BX, UK
phone: +44 151 794 3878
email: hanke at liverpool.ac.uk
web:   http://pcwww.liv.ac.uk/~hanke/
-----------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixCM.py
Type: text/x-python-script
Size: 933 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20110307/00bee183/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixCM_example.py
Type: text/x-python-script
Size: 1138 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20110307/00bee183/attachment-0001.bin>


More information about the ase-users mailing list