Rurali, I llokedinto your discussion and it helped us. Then I tried Silican as an example. I have two atoms and I wanted not to relax both the atoms and modified the constr.f file andthen recomplie it, but it didnt wirk. Then I thought lets add constrain on two atoms and I added the following line in the constr.f file. fa(3,1)=0.0d0 fa(3,2)=0.0d0 Which means that folrce along z axis on atom 1 and two will be zero. When I recompiled the code and run it, thn it relaxed both the atoms in the unit cell. I started from the following lines %block AtomicCoordinatesAndAtomicSpecies 0. 0. 0.3 1 Si 1 0.25 0.25 0.26 1 Si 2 %endblock AtomicCoordinatesAndAtomicSpecies And got the Following relaxed cocordines. outcoor: Relaxed atomic coordinates (fractional): 0.00054664 0.00054723 0.15300834 1 1 Si 0.25058586 0.25058642 0.40284097 1 2 Si In principles,if I am right, it should not relax these two atoms, but it does. Can you help me how to handle it. Actually my system has about 100 atoms and I dont need to relax all the atoms, just a few atoms near the surface. So I am learning this method and tries Silicon. Mic
--- On Fri, 1/21/11, Riccardo Rurali <[email protected]> wrote: From: Riccardo Rurali <[email protected]> Subject: Re: [SIESTA-L] For help: How to pply a constant initial velocity or external force on some atoms of a system. To: [email protected] Date: Friday, January 21, 2011, 6:36 AM Hi there. On 1/20/11 5:29 PM, Li, Shunfang wrote: > My questions are the following: > 1)Can we apply a constant initial velocity on some atoms of a system, in > a MD simulations performed by Siesta? > I know, the atoms are assigned random velocities drawn from the > Maxwell-Bolzmann distribution with the corresponding temperature in a MD > simulation, however, you know, the constraint of zero center of mass > velocity is imposed. If you want to apply a constant *initial* velocity this is easily done with a little trick. You run a fake calculation at your interested target temperature. I call it "fake", because you need this calculation only to have Siesta write the XV file. You don't even need to converge the electronic density. The XV file will contain the atomic positions (your initial coordinates if you don't relax) and the velocities sampled form the Maxwell-Boltzmann distribution, as you said. You can edit that file and define the velocity you like for the atoms(s) you like. You are now ready to run your calculation, making sure you specify the option MD.UseSaveXV true. In this way the initial positions and velocities are read from the XV file. This should do what you want. > 2)Alternatively, can we apply external force on the atoms? > If it is okay, how to construct the input file? Or should we modify the > source code? You should modify the source code, but the developers have prepared a simple way for you to do it. Edit the file constr.f in the Src folder and add the kind of constraint that you like. If you add the line fa(3,132) = 0.5 for instance, at each MD step the force along z of the atoms number 132 will be set to 0.5. Don't forget to recompile Siesta and to specify the constraint: %block GeometryConstraints routine constr %endblock GeometryConstraints Good luck, Riccardo -- Riccardo Rurali Institut de Ciència de Materials de Barcelona (ICMAB) Consejo Superior de Investigaciones Científicas (CSIC) Campus de Bellaterra 08193 Bellaterra (Barcelona) Spain tel.: +34 93 5801853 ext. 347 e-mail: [email protected] http://www.icmab.es/dmmis/leem/ Man, the dope's that there's still hope
