miniyuan
Linux 基础命令
注:
- 如果你使用的是 Remote-SSH 扩展,那么可以直接从宿主机拖动文件上传至虚拟机而不需要使用 winscp(因为 Remote-SSH 实际上内置了 SFTP 功能)。
- 在命令行中单引号和双引号有很大区别,双引号会进行变量解析和转移,而单引号不会。一般情况下建议使用单引号。
题目 4
# 统计 source/ 目录下的 .cpp 文件数
$ find source/ -name '*.cpp' | wc -l
1068
# 查找 README.md 中包含 "DFT" 的行
$ grep 'DFT' README.md
ABACUS (**A**tomic-orbital **B**ased **A**b-initio **C**omputation at **US**tc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
# 查找 examples/ 目录下包含 "ecutwfc" 的文件
$ grep -r 'ecutwfc' examples/
examples/31_comp_charge/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/05_soc/pw_GaAs/INPUT-scf:ecutwfc 50
examples/05_soc/pw_GaAs/INPUT-nscf:ecutwfc 50
examples/relax/pw_output/INPUT:ecutwfc 10
examples/relax/lcao_output/INPUT:ecutwfc 10
examples/21_deepks/pw_H2O/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/21_deepks/lcao_H2O/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/21_deepks/lcao_CsPbI3/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/14_mulliken/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/fcc_SiO2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/hexagonal_MoS2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/so_SnTe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/06_smearing/lcao_fe/INPUT_1:ecutwfc 20
examples/06_smearing/lcao_fe/INPUT_2:ecutwfc 20
examples/interface_dpgen/autotest/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_dpgen/autotest/INPUT.rlx:ecutwfc 50
examples/interface_dpgen/init_and_run/run_param.json: "ecutwfc": 40,
examples/interface_dpgen/init_and_run/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_dpgen/init_and_run/INPUT.md:ecutwfc 40
examples/09_density_matrix/lcao_nspin1_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/scf_Si64/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/scf_spin_Fe2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/md_Si8/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/27_fixed_occ/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/36_gpu/si16_pw/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/36_gpu/si16_lcao/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/20_hybrid_func/lcao_Si2/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/20_hybrid_func/pw_Si2/INPUT:ecutwfc 50
examples/23_sdft/pw_md_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/23_sdft/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/15_force/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_hefei-namd/INPUT: ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_wannier90/ABACUS_towannier90_lcao_in_pw/INPUT-scf:ecutwfc 50
examples/interface_wannier90/ABACUS_towannier90_lcao_in_pw/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_wannier90/ABACUS_towannier90_lcao_in_pw/INPUT-nscf:ecutwfc 50
examples/interface_wannier90/ABACUS_towannier90_pw/INPUT-scf:ecutwfc 50
examples/interface_wannier90/ABACUS_towannier90_pw/INPUT-nscf:ecutwfc 50
examples/interface_wannier90/ABACUS_towannier90_lcao/INPUT-scf:ecutwfc 50
examples/interface_wannier90/ABACUS_towannier90_lcao/INPUT-nscf:ecutwfc 50
examples/26_berryphase/pw_PbTiO3/INPUT-nscf-b:ecutwfc 50
examples/26_berryphase/pw_PbTiO3/INPUT-nscf-a:ecutwfc 50
examples/26_berryphase/pw_PbTiO3/INPUT-scf:ecutwfc 50
examples/26_berryphase/pw_PbTiO3/INPUT-nscf-c:ecutwfc 50
examples/26_berryphase/lcao_PbTiO3/INPUT-nscf-b:ecutwfc 50
examples/26_berryphase/lcao_PbTiO3/INPUT-nscf-a:ecutwfc 50
examples/26_berryphase/lcao_PbTiO3/INPUT-scf:ecutwfc 50
examples/26_berryphase/lcao_PbTiO3/INPUT-nscf-c:ecutwfc 50
examples/33_uspp/bcc_Fe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/33_uspp/README:`ecutrho` should be no less than 4 times of `ecutwfc`. (`ecutrho` = 8 to 12 times `ecutwfc`, typically)
examples/33_uspp/README:ecutwfc 40
examples/08_charge_density/pw_nspin2_Fe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/08_charge_density/pw_nspin1_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/08_charge_density/lcao_nspin1_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_ShengBTE/LCAO/2nd/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_ShengBTE/LCAO/3rd/run_stru.sh:ecutwfc 100
examples/interface_ShengBTE/PW/2nd/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_ShengBTE/PW/3rd/run_stru.sh:ecutwfc 50
examples/11_wfc/lcao_ienvelope_Si2/INPUT1:ecutwfc 50
examples/11_wfc/lcao_ienvelope_Si2/INPUT2:ecutwfc 50
examples/11_wfc/pw_scf_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/11_wfc/lcao_scf_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/30_elec_pot/lcao_Si/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/18_md/lcao_gammaonly_Si8/INPUT_6:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_7:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_1:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_3:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_2:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_0:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_4:ecutwfc 30
examples/18_md/lcao_gammaonly_Si8/INPUT_5:ecutwfc 30
examples/12_band/pw_Al/INPUT1:ecutwfc 50
examples/12_band/pw_Al/INPUT2:ecutwfc 50
examples/12_band/lcao_Si2/INPUT1:ecutwfc 50
examples/12_band/lcao_Si2/INPUT2:ecutwfc 50
examples/25_vdw/si2-vdwd2/INPUT1:ecutwfc 50
examples/25_vdw/si2-vdwd2/INPUT2:ecutwfc 50
examples/25_vdw/si2-vdwd3/INPUT1:ecutwfc 50
examples/25_vdw/si2-vdwd3/INPUT2:ecutwfc 50
examples/25_vdw/si2-vdwd3/INPUT3:ecutwfc 50
examples/28_efield/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/04_noncollinear/BCC_Fe_NC_ground_state/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/16_stress/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/19_dftu/NiO/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/17_relax/lcao_gammaonly_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/17_relax/pw_al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/17_relax/pw_output/INPUT:ecutwfc 10
examples/17_relax/lcao_output/INPUT:ecutwfc 10
examples/32_imp_sol_model/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/07_charge_mixing/pw_Al/INPUT_1:ecutwfc 30
examples/07_charge_mixing/pw_Al/INPUT_3:ecutwfc 30
examples/07_charge_mixing/pw_Al/INPUT_2:ecutwfc 30
examples/07_charge_mixing/pw_Al/INPUT_4:ecutwfc 30
examples/03_spin_polarized/ATOM/INPUT:ecutwfc 60 # Rydberg, with pseudopot, lcao use pw for inner part ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/03_spin_polarized/AFM/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/03_spin_polarized/FM/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_Cu/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_ZnO/INPUT:ecutwfc 120 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/README:- set 'ecutwfc' to define the enegy cutoff
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/05-10.21a0-0.51a/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/04-10.21a0-0.01atom1/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/01-10.21a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/00-Fit/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/02-10.00a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/03-10.40a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/05-10.21a0-0.51a/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/04-10.21a0-0.01atom1/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/01-10.21a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/00-Fit/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/02-10.00a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/03-10.40a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/pw-basis/INPUT:ecutwfc 400 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/lcao-basis/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/c-NaCl/pw-basis/INPUT:ecutwfc 200 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/c-NaCl/lcao-basis/INPUT:ecutwfc 200 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/13_dos/pw_Al/INPUT1:ecutwfc 50
examples/13_dos/pw_Al/INPUT2:ecutwfc 50
examples/13_dos/lcao_Si2/INPUT1:ecutwfc 50
examples/13_dos/lcao_Si2/INPUT2:ecutwfc 50
examples/10_hs_matrix/out_hs2_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_hs_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_hs_gammaonly/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_s_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/29_dipole_corr/Pt-slab/INPUT1:ecutwfc 60
examples/29_dipole_corr/Pt-slab/INPUT2:ecutwfc 60
examples/34_bsse/water/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/lcao_H2O/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/H2-RI-J-aims-benchmark/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_phonopy/INPUT:ecutwfc 80 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/22_rt-tddft/Absoption_spectrum/H2_length/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/22_rt-tddft/Absoption_spectrum/H2_velocity/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
# 查找 examples/ 目录下名为 INPUT 的文件
$ find examples/ -name 'INPUT'
examples/31_comp_charge/Pt-slab/INPUT
examples/relax/pw_output/INPUT
examples/relax/lcao_output/INPUT
examples/21_deepks/pw_H2O/INPUT
examples/21_deepks/lcao_H2O/INPUT
examples/21_deepks/lcao_CsPbI3/INPUT
examples/14_mulliken/lcao_Si2/INPUT
examples/01_bravais_lattice/fcc_SiO2/INPUT
examples/01_bravais_lattice/hexagonal_MoS2/INPUT
examples/01_bravais_lattice/so_SnTe/INPUT
examples/interface_dpgen/autotest/INPUT
examples/interface_dpgen/init_and_run/INPUT
examples/09_density_matrix/lcao_nspin1_Si2/INPUT
examples/35_pexsi/scf_Si64/INPUT
examples/35_pexsi/scf_spin_Fe2/INPUT
examples/35_pexsi/md_Si8/INPUT
examples/27_fixed_occ/INPUT
examples/36_gpu/si16_pw/INPUT
examples/36_gpu/si16_lcao/INPUT
examples/20_hybrid_func/lcao_Si2/INPUT
examples/20_hybrid_func/pw_Si2/INPUT
examples/23_sdft/pw_md_Al/INPUT
examples/23_sdft/pw_Si2/INPUT
examples/15_force/pw_Si2/INPUT
examples/interface_hefei-namd/INPUT
examples/interface_wannier90/ABACUS_towannier90_lcao_in_pw/INPUT
examples/33_uspp/bcc_Fe/INPUT
examples/08_charge_density/pw_nspin2_Fe/INPUT
examples/08_charge_density/pw_nspin1_Al/INPUT
examples/08_charge_density/lcao_nspin1_Si2/INPUT
examples/interface_ShengBTE/LCAO/2nd/INPUT
examples/interface_ShengBTE/PW/2nd/INPUT
examples/11_wfc/pw_scf_Al/INPUT
examples/11_wfc/lcao_scf_Si2/INPUT
examples/30_elec_pot/lcao_Si/INPUT
examples/28_efield/Pt-slab/INPUT
examples/04_noncollinear/BCC_Fe_NC_ground_state/INPUT
examples/16_stress/pw_Si2/INPUT
examples/19_dftu/NiO/INPUT
examples/17_relax/lcao_gammaonly_Si2/INPUT
examples/17_relax/pw_al/INPUT
examples/17_relax/pw_output/INPUT
examples/17_relax/lcao_output/INPUT
examples/32_imp_sol_model/Pt-slab/INPUT
examples/03_spin_polarized/ATOM/INPUT
examples/03_spin_polarized/AFM/INPUT
examples/03_spin_polarized/FM/INPUT
examples/02_scf/lcao_Si2/INPUT
examples/02_scf/pw_Si2/INPUT
examples/02_scf/lcao_Cu/INPUT
examples/02_scf/lcao_ZnO/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/05-10.21a0-0.51a/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/04-10.21a0-0.01atom1/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/01-10.21a0/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/00-Fit/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/02-10.00a0/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/03-10.40a0/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/05-10.21a0-0.51a/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/04-10.21a0-0.01atom1/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/01-10.21a0/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/00-Fit/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/02-10.00a0/INPUT
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/03-10.40a0/INPUT
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/pw-basis/INPUT
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/lcao-basis/INPUT
examples/vc-Si-Al-Nacl-example/c-NaCl/pw-basis/INPUT
examples/vc-Si-Al-Nacl-example/c-NaCl/lcao-basis/INPUT
examples/10_hs_matrix/out_hs2_multik/INPUT
examples/10_hs_matrix/out_hs_multik/INPUT
examples/10_hs_matrix/out_hs_gammaonly/INPUT
examples/10_hs_matrix/out_s_multik/INPUT
examples/34_bsse/water/INPUT
examples/24_lr-tddft/lcao_Si2/INPUT
examples/24_lr-tddft/lcao_H2O/INPUT
examples/24_lr-tddft/H2-RI-J-aims-benchmark/INPUT
examples/interface_phonopy/INPUT
examples/22_rt-tddft/Absoption_spectrum/H2_length/INPUT
examples/22_rt-tddft/Absoption_spectrum/H2_velocity/INPUT
# 查找 examples/ 目录下所有 INPUT 中设置 ecutwfc > 50 的行
# \s* 代表若干空白字符
# 5[1-9] 代表 51-59
# [6-9][0-9] 代表 60-99
# [1-9][0-9]{2,} 代表三及以上的位数
# --include 代表指定的文件名
# 注意需要使用 -r 和 -E
$ grep -rE 'ecutwfc\s*(5[1-9]|[6-9][0-9]|[1-9][0-9]{2,})' examples/ --include='INPUT'
examples/31_comp_charge/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/21_deepks/pw_H2O/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/21_deepks/lcao_H2O/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/21_deepks/lcao_CsPbI3/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/14_mulliken/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/fcc_SiO2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/hexagonal_MoS2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/01_bravais_lattice/so_SnTe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_dpgen/autotest/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_dpgen/init_and_run/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/09_density_matrix/lcao_nspin1_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/scf_Si64/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/scf_spin_Fe2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/35_pexsi/md_Si8/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/27_fixed_occ/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/36_gpu/si16_pw/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/36_gpu/si16_lcao/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/20_hybrid_func/lcao_Si2/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/23_sdft/pw_md_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/23_sdft/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/15_force/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_hefei-namd/INPUT: ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_wannier90/ABACUS_towannier90_lcao_in_pw/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/33_uspp/bcc_Fe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/08_charge_density/pw_nspin2_Fe/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/08_charge_density/pw_nspin1_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/08_charge_density/lcao_nspin1_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_ShengBTE/LCAO/2nd/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_ShengBTE/PW/2nd/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/11_wfc/pw_scf_Al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/11_wfc/lcao_scf_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/30_elec_pot/lcao_Si/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/28_efield/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/04_noncollinear/BCC_Fe_NC_ground_state/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/16_stress/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/19_dftu/NiO/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/17_relax/lcao_gammaonly_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/17_relax/pw_al/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/32_imp_sol_model/Pt-slab/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/03_spin_polarized/ATOM/INPUT:ecutwfc 60 # Rydberg, with pseudopot, lcao use pw for inner part ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/03_spin_polarized/AFM/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/03_spin_polarized/FM/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/pw_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_Cu/INPUT:ecutwfc 100 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/02_scf/lcao_ZnO/INPUT:ecutwfc 120 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/05-10.21a0-0.51a/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/04-10.21a0-0.01atom1/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/01-10.21a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/00-Fit/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/02-10.00a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/pw-basis/03-10.40a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/05-10.21a0-0.51a/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/04-10.21a0-0.01atom1/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/01-10.21a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/00-Fit/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/02-10.00a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/a-Si2_diamond/lcao-basis/03-10.40a0/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/pw-basis/INPUT:ecutwfc 400 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/b-Al_PrimCell/lcao-basis/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/c-NaCl/pw-basis/INPUT:ecutwfc 200 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/vc-Si-Al-Nacl-example/c-NaCl/lcao-basis/INPUT:ecutwfc 200 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_hs2_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_hs_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_hs_gammaonly/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/10_hs_matrix/out_s_multik/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/34_bsse/water/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/lcao_Si2/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/lcao_H2O/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/24_lr-tddft/H2-RI-J-aims-benchmark/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/interface_phonopy/INPUT:ecutwfc 80 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/22_rt-tddft/Absoption_spectrum/H2_length/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
examples/22_rt-tddft/Absoption_spectrum/H2_velocity/INPUT:ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
# 查找 examples/ 目录下所有 run.sh 文件并为它们添加执行权限
# {} 代表需替换的参数
# \; 代表各文件执行一次命令
$ find examples/ -name 'run.sh' -exec chmod +x {} \;
# + 代表所有文件一次性执行,对于支持多参数的 chmod 更高效
$ find examples/ -name 'run.sh' -exec chmod +x {} +
题目 5
# 替换文本并保存
# 题目中保存为 INPUT_modified 理解为根目录下的文件
# ecutwfc\s*60 查找内容,其中\s*代表若干空白字符
# ecutwfc 80 替换内容
$ sed 's/ecutwfc\s*60/ecutwfc 80/' examples/02_scf/pw_Si2/INPUT > ./INPUT_modified
# 提取所有 # 开头的注释行
$ awk '/^#/' examples/02_scf/pw_Si2/INPUT
#Parameters (General)
#Parameters (Accuracy)
### [1] Energy cutoff determines the quality of numerical quadratures in your calculations.
### So it is strongly recommended to test whether your result (such as converged SCF energies) is
### converged with respect to the energy cutoff.
# 统计 source/ 目录下的 .cpp 文件中包含 "include" 的总行数
# grep 先递归找出各 .cpp 文件下的 "include" 行数
# awk 对输出结果中对应行数的第 2 列进行求和
$ grep -rc 'include' source/ --include='*.cpp' | awk -F: '{sum += $2} END {print sum}'
6544
# 提取文件中所有 "参数名:参数值"
# !/^#/ 排除注释行
# NF>=2 保证列数大于等于 2,否则会有空白行
$ awk '!/^#/ && NF>=2 {print $1 ":" $2}' examples/02_scf/pw_Si2/INPUT
pseudo_dir:../../../tests/PP_ORB
symmetry:1
basis_type:pw
ecutwfc:60
scf_thr:1e-7
scf_nmax:100
device:cpu
ks_solver:dav_subspace
precision:double
# 统计 source/ 目录下的 .cpp 文件的总大小
# -R 表示递归列举
# /\.cpp$/ 表示以 .cpp 结尾,\. 为 REX 中的转义字符
# $5 第5列为文件大小,单位 B
# /1024/1024 B转换MB
$ ls -lR source/ | awk '/\.cpp$/ {sum += $5} END {print sum/1024/1024 "MB"}'
13.9417MB