[QE-users] How to carry out a series of simulations at the same time and output the stress and energy to one file?

Hao Chen chenhao.hitgucas at gmail.com
Wed Aug 29 21:33:52 CEST 2018


Tried. It works. Thanks very much, Dr. Minho Lee.

Minho Lee <mino at simulation.re.kr> 于2018年8月28日周二 上午5:18写道:

> Dear Hao Chen,
>
> I think linux command “grep” and “tail" may helpful for you.
>
> For example, if you have several job directories and each direcotires have
> standard output file named “job.out”,
>
> You can get final energy of one job with following command
>
> *grep “total energy” jobdir/job.out|grep “^!”|tail -n 1*
>
> You can also use above command in for loop (bash script)
>
> *for i in jobdir1 jobdir2 jobdir3*
> *do*
> *grep “total energy” jobdir/job.out|grep “^!”|tail -n 1*
> *done*
>
> for loop can also be used when you submit your multiple pw.x jobs
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *for celldim in `seq 10.0 0.1 10.4 ` do mkdir cell_${celldim} cat >
> cell_${celldim}/in.pw.x << EOF &CONTROL calculation ='scf', verbosity =
> 'high', restart_mode='from_scratch', pseudo_dir='/home/mino/psp',
> outdir='output', tstress = .true., / &SYSTEM ibrav = 1, celldm(1) =
> ${celldim}, nat = 8, ntyp = 1, ecutwfc = 35, ecutrho = 280, occupations =
> 'fixed', smearing = 'gauss', degauss = 0.02, nosym=.true., noncolin=.true.,
> lspinorb=.true. nbnd =50, / &ELECTRONS conv_thr = 1.D-6, mixing_beta = 0.3,
> / &IONS ion_dynamics = 'bfgs', / &CELL cell_dynamics = 'bfgs', cell_dofree
> = 'volume', / ATOMIC_SPECIES Si 28.0855 Si.UPF ATOMIC_POSITIONS (crystal)
> Si 0.00000 0.00000 0.00000 Si 0.00000 0.50000 0.50000 Si 0.50000 0.50000
> 0.00000 Si 0.50000 0.00000 0.50000 Si 0.75000 0.25000 0.75000 Si 0.25000
> 0.25000 0.25000 Si 0.25000 0.75000 0.75000 Si 0.75000 0.75000 0.25000
> K_POINTS automatic 1 1 1 0 0 0 EOF cd cell_${celldim} mpirun -np 28
> /usr/local//src/qe-6.3/bin/pw.x < in.pw.x > job.dat cd .. done*
>
> Good Luck :)
>
>
> Minho Lee
>
> ------------------------
> Minho Lee
> CEO/Developer
> T. 02-3293-0204 | C. 010-2770-4080
> E. mino at virtuallab.co.kr | H. http://www.virtuallab.co.kr
>
> On-demand Materials Simulation
> https://www.materialssquare.com
> On 28 Aug 2018, 10:38 AM +0900, Hao Chen <chenhao.hitgucas at gmail.com>,
> wrote:
>
> Dear Dr. Stephen Weitzner
>
> Thanks very much. Would you like to let me know which example I should
> look at? Thanks again.
>
> Cheers!
>
> Hao
>
> Weitzner, Stephen Eric <weitzner1 at llnl.gov> 于2018年8月27日周一 下午8:22写道:
>
>> Hi Hao,
>>
>>
>>
>> If you take a look at one of the PWscf examples, specifically one of the
>> “run_example” shell scripts, you can find an example for how to do what you
>> are asking. The book Stefano suggested will teach you how to write such
>> scripts. There are also free alternatives online that are just a google
>> search away.
>>
>>
>>
>> Good luck.
>>
>>
>>
>> --
>>
>> Stephen Weitzner, PhD
>>
>> Postdoctoral Research Scientist
>>
>> Quantum Simulations Group
>>
>> Lawrence Livermore National Laboratory
>>
>>
>>
>>
>>
>> *From:* users <users-bounces at lists.quantum-espresso.org> on behalf of
>> Hao Chen <chenhao.hitgucas at gmail.com>
>> *Reply-To:* Quantum Espresso users Forum <
>> users at lists.quantum-espresso.org>
>> *Date:* Monday, August 27, 2018 at 5:12 PM
>> *To:* "users at lists.quantum-espresso.org" <
>> users at lists.quantum-espresso.org>
>> *Subject:* Re: [QE-users] How to carry out a series of simulations at
>> the same time and output the stress and energy to one file?
>>
>>
>>
>> Thanks. I mean is there some command like in LAMMPS that can carry out
>> simulations multitimes with just changing the parameters and output to the
>> same file?
>>
>>
>>
>> Stefano Baroni <baroni at sissa.it> 于2018年8月27日周一 下午7:08写道:
>>
>>
>> https://www.dummies.com/DummiesTitle/UNIX-For-Dummies-5th-Edition.productCd-0764541471.html
>>
>> ___
>>
>> Stefano Baroni, Trieste -- http://stefano.baroni.me
>>
>>
>> On 28 Aug 2018, at 02:01, Hao Chen <chenhao.hitgucas at gmail.com> wrote:
>>
>> Dear All
>>
>>
>>
>>      I am a beginner of quantum espresso. I tried to run single
>> simulations and it seem to work now. What I want to investigate is the
>> phase transformation process of silicon. I need carry out a bunch of
>> simulations with different lattice constants. I want to output the energy
>> and the stress state to one file. Do anyone know which command I should use
>> for this purpose? Thanks very much!
>>
>>
>>
>> Wish you all the best!
>>
>>
>>
>> Hao
>>
>> _______________________________________________
>> users mailing list
>> users at lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>
>> _______________________________________________
>> users mailing list
>> users at lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>
>> _______________________________________________
>> users mailing list
>> users at lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20180829/d1bd5452/attachment.html>


More information about the users mailing list