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

2018-08-29 Thread Hao Chen
Tried. It works. Thanks very much, Dr. Minho Lee.

Minho Lee  于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  calculation ='scf', verbosity =
> 'high', restart_mode='from_scratch', pseudo_dir='/home/mino/psp',
> outdir='output', tstress = .true., /  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, /  conv_thr = 1.D-6, mixing_beta = 0.3,
> /  ion_dynamics = 'bfgs', /  cell_dynamics = 'bfgs', cell_dofree
> = 'volume', / ATOMIC_SPECIES Si 28.0855 Si.UPF ATOMIC_POSITIONS (crystal)
> Si 0.0 0.0 0.0 Si 0.0 0.5 0.5 Si 0.5 0.5
> 0.0 Si 0.5 0.0 0.5 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. m...@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 ,
> 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  于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  on behalf of
>> Hao Chen 
>> *Reply-To:* Quantum Espresso users Forum <
>> users@lists.quantum-espresso.org>
>> *Date:* Monday, August 27, 2018 at 5:12 PM
>> *To:* "users@lists.quantum-espresso.org" <
>> users@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  于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  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@lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>
>> ___
>> users mailing list
>> users@lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>
>> ___
>> users mailing list
>> users@lists.quantum-espresso.org
>> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-28 Thread Minho Lee
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

calculation ='scf',
verbosity = 'high',
restart_mode='from_scratch',
pseudo_dir='/home/mino/psp',
outdir='output',
tstress = .true.,
/

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,
/

conv_thr = 1.D-6,
mixing_beta = 0.3,
/

ion_dynamics = 'bfgs',
/

cell_dynamics = 'bfgs',
cell_dofree = 'volume',
/
ATOMIC_SPECIES
Si 28.0855 Si.UPF
ATOMIC_POSITIONS (crystal)
Si 0.0 0.0 0.0
Si 0.0 0.5 0.5
Si 0.5 0.5 0.0
Si 0.5 0.0 0.5
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. m...@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 , 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  于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  on behalf of Hao 
> > > Chen 
> > > Reply-To: Quantum Espresso users Forum 
> > > Date: Monday, August 27, 2018 at 5:12 PM
> > > To: "users@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  于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  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@lists.quantum-espresso.org
> > > > > https://lists.quantum-espresso.org/mailman/listinfo/users
> > > > ___
> > > > users mailing list
> > > > users@lists.quantum-espresso.org
> > > > https://lists.quantum-espresso.org/mailman/listinfo/users
> > > ___
> > > users mailing list
> > > users@lists.quantum-espresso.org
> > > https://lists.quantum-espresso.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-27 Thread Hao Chen
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  于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  on behalf of Hao
> Chen 
> *Reply-To: *Quantum Espresso users Forum  >
> *Date: *Monday, August 27, 2018 at 5:12 PM
> *To: *"users@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  于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  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@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-27 Thread Weitzner, Stephen Eric
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  on behalf of Hao Chen 

Reply-To: Quantum Espresso users Forum 
Date: Monday, August 27, 2018 at 5:12 PM
To: "users@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 mailto:bar...@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 
mailto:chenhao.hitgu...@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@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-27 Thread Hao Chen
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  于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  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@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-27 Thread Stefano Baroni
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  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@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
___
users mailing list
users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

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

2018-08-27 Thread Hao Chen
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@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users