2025年4月AMD平台下VASP的编译安装

WSL2安装

本次安装选择的Ubuntu作为发行版,使用人数较多,解决方案较多

Ubuntu 24.04.1 on AMD 7840HS

更新源

1
sudo apt update

安装编译器

AOCC

下载aocc-compiler-5.0.0.tar,解压

1
2
3
4
tar -xvf aocc-compiler-5.0.0.tar #解压
cd aocc-compiler-3.2.0 #进入目录
install.sh #如果没有可执行权限请赋予可执行权限, chmod +x install.sh
source .setenv_AOCC.sh #这一行可以写入~/.bashrc,然后source ~/.bashrc,刷新一下环境变量

AOCL

下载AOCL 5.0 binary packages compiled with AOCC 5.0

1
2
3
tar -zxvf XXX.tar.gz #解压tar.gz包,如果报错请查询Linux下的解压命令,up记不太清了、、、  
cd XXX
install.sh -t /home/XXX #安装,可以指定安装目录,up安装在/home目录下的某个文件夹里的,这样不需要管理员权限、

安装OpenMPI

在安装OpenMPI之前请确保AOCC、AOCL以及必备的依赖已安装完全

1
2
3
4
5
6
7
8
which clang #检查clang
which clang++ #检查clang++
which flang #检查flang
以上三个来自于AOCC和AOCL
which c #检查有没有C
which c++ #检查有没有C++
sudo apt install g++
sudo apt install gcc

下载OpenMPI的稳定版本,然后解压,进入目录

1
2
3
configure CC=clang CXX=clang++ FC=flang --prefix=/xxxx #可以手动指定/xxx目录
make -j4 #以4核心编译,大小可调,比如16核处理器就改成make -j16
make install #编译安装

OpenMPI安装时报错很可能是由于依赖问题造成的,建议安装之前sudo apt install g++ cmake gcc

~/.bashrc中添加环境变量

1
2
3
4
MPI_HOME=/xxx/; make #这一步容易出错,记得添加对目录
export PATH=${MPI_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MANPATH=${MPI_HOME}/share/man:$MANPATH

安装完后检查一下which mpirun

编译VASP

不提供源码包,可以尝试去各种论坛,微信公众号搜索,仅供学习使用

本次使用的源码包是vasp.6.4.2.tgz

编译之前首先要选择模板,也就是makefile.include,将/vasp.x.x.x/arch文件夹下的makefile.include.aocc_ompi_aocl复制一份到/vasp.x.x.x根目录,因为本次平台是AMD ZEN4,安装了AOCC,AOCL和OpenMPI,所以选择此模板,接下来修改模板

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxGNU\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf

CPP = flang -E -ffree-form -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC = mpif90
FCL = mpif90

FREE = -ffree-form -ffree-line-length-none

FFLAGS = -w -fno-fortran-main -Mbackslash

OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0

OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = clang
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)

OBJECTS_LIB = linpack_double.o

# For the parser library
CXX_PARS = clang++
LLIBS = -lstdc++

##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##

# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU ?= -march=znver4 #7840HS belongs to ZEN4 platform
FFLAGS += $(VASP_TARGET_CPU)

# BLAS (mandatory)
AMDBLIS_ROOT ?= /home/storm/AOCL_INSTALL/5.0.0/aocc #Installation category of AOCL
BLAS = -L${AMDBLIS_ROOT}/lib -lblis

# LAPACK (mandatory)
AMDLIBFLAME_ROOT ?= /home/storm/AOCL_INSTALL/5.0.0/aocc #Installation category of AOCL
LAPACK = -L${AMDLIBFLAME_ROOT}/lib -lflame

# scaLAPACK (mandatory)
AMDSCALAPACK_ROOT ?= /home/storm/AOCL_INSTALL/5.0.0/aocc #Installation category of AOCL
SCALAPACK = -L${AMDSCALAPACK_ROOT}/lib -lscalapack

LLIBS += $(SCALAPACK) $(LAPACK) $(BLAS)

# FFTW (mandatory)
AMDFFTW_ROOT ?= /home/storm/AOCL_INSTALL/5.0.0/aocc #Installation category of AOCL
LLIBS += -L$(AMDFFTW_ROOT)/lib -lfftw3
INCS += -I$(AMDFFTW_ROOT)/include

# HDF5-support (optional but strongly recommended)
#CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
#INCS += -I$(HDF5_ROOT)/include

# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS += -DVASP2WANNIER90
#WANNIER90_ROOT ?= /path/to/your/wannier90/installation
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier

然后运行make all即可,官网给的命令是并行安装make DEPS=1 -Jn <target>,我自己尝试并行安装后测试make test会报错,所以make all,这样去测试全部通过不报错

测试安装

为了测试是否正确安装,可以进行测试

1
make test

添加到环境变量

官方提供的是源码包,通过编译,我们得到了CPU可执行的二进制包,再二进制包的目录下(bin/目录下),我可以同在终端中直接输入二进制包的名字来直接执行(VASP编译会产生三个二进制包:vasp_std, vasp_gam, vasp_ncl),比如在bin/目录下直接输入vasp_std就可以看到VASP的标志,但是为了随时随地在任意目录下也能执行计算,因此需要将bin/目录添加到环境变量里(前提是make test不报错)

1
2
export PATH=$PATH:/path/to/vasp.x.x.x/bin
source ~/.bashrc

Comment and share

Mild Waterfall

in 沉思录

这几天高强度学习VASP第一性原理计算,越来越上头了,尽管还不能figure out每一个参数的含义,但是大概已经弄懂一些简单算例的思路了。

上午终于也是向老师交流完实验室的事,有一种如释重负的感觉。

中午意外地抢到了五一去北京的票,终于能和老同学相见了~😜

下午又是、、、仪器分析实验,D A M N! 极度缺乏ATP的大脑拖着我,稀里糊涂的弄完高效液相色谱实验,回到图书馆美美地睡了一觉,起床又继续学VASP😇

春日宴,绿酒一杯歌一遍~

Comment and share

THE ERA OF MIGHT MAKES RIGHT

In the MAGA vision of the national interest, America will be more like Russia, China, and Iran. (BY GEORGE PACKER)

The best way to ==dismantle== the federal government, then ==repurpose== it as a tool of personal power and ideological warfare, is to start with the soft targets. Entitlements and defense, which comprise more than half of federal spending and a large share of its fraud and waste, enjoy too much support for Elon Musk to ==roll them up== easily. But nothing is less popular than sending taxpayers’ money to unknown people in poor, faraway countries that might ==be rife with corruption== . Americans dislike foreign aid so much that they wrongly believe it consumes at least a quarter of the budget (in the previous fiscal year, aid constituted barely 1 percent). President John F. Kennedy understood the problem, and after creating the United States Agency for International Development, in 1961, he told his advisers: “We hope we can tie this whole concept of aid to the safety of the United States. That is the reason we give aid. The test is whether it will serve the United States. Aid is not a good word. Perhaps we can describe it better as ‘Mutual Assistance.’ ” At another meeting, Kennedy suggested “International Security.”

USAID continued for the next six decades because leaders of both parties believed that ending ==polio== , preventing famine, stabilizing poor countries, strengthening democracies, and opening new markets served the United States. But on January 20, within hours of his inauguration, President Donald Trump signed an executive order that froze foreign aid. USAID was instructed to stop nearly all work. Its Washington headquarters was occupied and sensitive data were ==seized== by ==whiz== kids from Musk’s Department of Government Efficiency, or DOGE. One of their elder members, a 25-yearold software engineer and Matt Gaetz fan named Gavin Kliger, acquired an official email address to instruct the staff of USAID to stay home.

Contractors were fired and employees ==were placed on indefinite leave== ; those on overseas missions were given 30 days to return to the States with their families. Under orders to remain silent, they used ==pseudonyms== on encrypted chats to inform the outside world of what was going on. When I spoke on Signal with government employees, they sounded as if they were in Moscow or Tehran. “It felt like it went very ==authoritarian== very quickly,” one ==civil servant== told me. “You have to watch everything you say and do in a way that is gross.”

The website usaid.gov vanished, then ==reappeared== with a ==bare-bones== announcement of the organization’s ==dismemberment== , followed by the message “Thank you for your service.” A ==veteran== USAID official called it “ ==brutal== — from some 20-yearold idiot who doesn’t know anything. What the fuck do you know about my service?” ==A curtain fell over the public information== that could have served to challenge the ==outpouring== of lies and ==distortions== from the White House and from Musk, who called USAID “a criminal organization” and “evil.” If you looked into the charges, nearly all turned out to be ==outright== ==falsehoods== , highly misleading, or isolated examples of the kind of stupid, wasteful programs that exist in any organization.

A ==grant== for hundreds of ethnic-minority students from Myanmar to attend universities throughout Southeast Asia became a propaganda tool in the hands of the ==wrecking crew== because it went under the name “Diversity and ==Inclusion== Scholar ship Program”—as if the money were going to a “woke” bureaucracy, not to Rohingya refugees from the military regime’s ==genocide== . The ==orthodoxy== of a previous administration required the ==terminology== ; the orthodoxy of the new one has ended the students’ education and forced them to return to the country that ==oppressed== them. One of Trump’s executive orders is called “Defending Women Against Gender Ideology Extremism and Restoring Biological Truth to the Federal Government”; meanwhile, the administration suspended the online education of nearly 1,000 women in Afghanistan who had been studying undetected by the Taliban with funding from the State Department.

But hardly anyone in this country knows these things. ==Contesting== Musk’s algorithmically boosted lies on X with the tools of a reporter is like fighting a wildfire with a garden hose.

With no workforce or funding, USAID’s efforts around the world—vaccine campaigns in Nepal, HIV-drug distribution in Nigeria, nutrition for starving children in Sudanese refugee camps—were forced to end. Secretary of State Marco Rubio (who ==championed== USAID as a senator and now, as the agency’s acting head, is its ==executioner== ) issued a ==waiver== for lifesaving programs. But it proved almost meaningless, because the people needed to run the programs were locked out of their computers, had no way to communicate, and feared punishment if they kept working.

The ==heedlessness== of the aid ==wreckers== recalls Nick Carraway’s description in The Great Gatsby of Tom and Daisy Buchanan: “They were careless people, Tom and Daisy—they smashed up things and creatures and then retreated back into their money or their vast carelessness, or whatever it was that kept them together, and let other people clean up the mess they had made.” An agency of 10,000 employees is shrinking to about 300 and, despite its ==statutory== independence, being dissolved into the State Department. The veteran USAID official I spoke with foresaw a ==skeletal== operation reduced to health and food assistance, with everything else—education, the environment, governance, economic development—gone.

But even basic ==humanitarian== programs will be nearly impossible to sustain with the numbers that the administration ==envisions== —for example, 12 staff members for all of Africa.

“This is the infrastructure and architecture that has given us a doubling of the human lifespan,” Atul Gawande, the writer and surgeon who was the most recent, and perhaps last, head of the agency’s Bureau for Global Health, told me. “Taking it down kills people.”

Trump and Musk’s destruction of USAID was a trial ==blitzkrieg== : Send tanks and ==bombers== into ==defenseless== Poland to see what works before turning on the Western powers. The ==assault== provided a model for ==eviscerating== the rest of the federal bureaucracy. It also demonstrated the radicalism of Trump’s view of America’s role in the world.

Every president from Franklin D. Roosevelt to Barack Obama understood that American power was enhanced, not threatened, by attaching it to alliances, institutions, and values that the American people support, such as freedom, ==pluralism== , and humanitarianism. This was the common idea behind Harry Truman’s Marshall Plan for ==postwar== Europe, Kennedy’s establishment of USAID, Jimmy Carter’s creation of the U.S. refugee program, and George W. Bush’s Emergency Plan for AIDS Relief. These weren’t simple acts of generosity. They were designed to prevent chaos and misery from overwhelming other countries and, eventually, harming our own. They expanded American influence by attraction rather than ==coercion== , showing people around the world that the ==Leviathan== could benefit them, too. Political scientists call this “soft power.”

Every president betrayed these ideas in one way or another, making U.S. foreign policy ==a fat target== for criticism at home and abroad, by the left and the right. Kennedy used foreign aid to ==wage== a bloody ==counterinsurgency== in South Vietnam; Carter put human rights at the center of his policy and then ==toasted the repressive== ==shah== of Iran; Bush, claiming to be spreading democracy to the Middle East, seriously damaged America’s global legitimacy. USAID ==antagonized== host governments and local populations with its ==arrogance== and ==bloat== . “We had a hand in our own destruction,” one longtime official told me. “We threw money in areas we didn’t need to.”

But the alternative to the ==hypocrisies== of soft power and the postwar liberal order was never going to be a ==chastened== , ==humbler== American foreign policy— neither the left’s fantasy of ==a plus-size Norway== nor the right’s of a return to the ==isolationist== 1920s. The U.S. is far too big, strong, and ==messianic== for voluntary diminish ment. The choice for this ==superpower== is between ==enlightened== ==selfinterest== , with all its blind spots and failures, and raw coercion.

Trump is showing what raw coercion looks like. Rather than negotiate with Canada and Mexico, impose U.S. demands with tariffs; rather than strengthen NATO, undermine it and threaten a conflict with one of its smallest, most ==benign== member countries; rather than review aid programs for their ==efficacy== , shut them down, ==slander== the people who make them work, and shrug at the humanitarian catastrophe that follows. The deeper reason for the extinction event at USAID is Trump’s contempt for anything that looks like cooperation between the strong and the weak. “America First” is more ==imperialist== than isolationist, which is why William McKinley, not George Washington or John Quincy Adams, is Donald Trump’s new presidential hero. He’s using a techno-futurist billionaire to return America to the late 19th century, when the civil service was a patronage network and great-power doctrine held that “might makes right.” He’s ridding himself and the country of restraining codes— the rule of law at home, the rules-based order abroad—and replacing them with a simple test: “What’s in it for me?” He’s ==unilaterally== ==disarming== America of its soft power, making the United States no different from China, Russia, or Iran. This is why the ==gutting== of USAID has received propaganda assistance and glowing reviews from Beijing, Moscow, and Tehran.

==Transactional== logic has an obvious appeal. ==Dispensing== with the annoying ==niceties== of multilateral partnerships and foreign aid brings a kind of clarity to international relations, showing where the real muscle is, like ==a strip-down== before a wrestling match. Set loose, the U.S. might be strong enough to work its will on weaker friends and neighbors, or at least claim to do so. Trump’s threat of tariffs to intimidate Colombia into allowing ==deportation== flights to land there was like the assault on USAID—an easy demonstration project. His domination of the propaganda sphere allows him to convince the public of victories even where, as with Canada, there was never much of a dispute to begin with. If NATO dissolved while the U.S. grabbed Greenland, many Americans would regard it as a net win: We’d save money and gain a strategic chunk of the North Atlantic while freeing ourselves of an obligation whose benefit to us wasn’t entirely clear.

It isn’t obvious why funding the education of oppressed Burmese students serves our national interest. It’s easier to see the advantages of strongarming weak countries into giving in to our demands. If this creates ==resentment== , well, who said gratitude mattered between nations? Strength has its own attractive force. A sizable ==cohort== of Americans have made their peace with Trump, not because he tempered his cruelty and checked his abuses but because he is at the height of his power and is using it without restraint. This is called power worship. The Russian invasion of Ukraine won Vladimir Putin a certain admiration in countries of the global South, as well as among MAGA Americans, while Joe Biden’s appeals to democratic values seemed ==pallid== and hypocritical. The law of “might makes right” is the political norm in most countries. Trump needs no explaining in Nigeria or India.

Coercion also depends on the American people’s ==shortsightedness== and ==incuriosity== .Trump’s flood of executive orders and Musk’s assault on the federal government are intended to create such chaos that not even the insiders most affected understand what’s happening. An inattentive public might simply see a Washington melee—the disrupters against the bureaucrats. Short of going to war, if the U.S. starts behaving like the great powers of earlier centuries and the rival powers of our own, how many Americans will notice a difference in their own lives?

According to Rubio, the purpose of the aid pause is to weed out programs that don’t advance “core national interests.” Gawande compared the process to stopping a plane in midair and firing the crew in order to conduct a review of the airline industry. But the light of the ==bonfire== burning in Washington makes it easier to see how soft power actually works—how most aid programs do serve the national interest. Shutting down African health programs makes monitoring the recent outbreak of Ebola in Uganda, and preventing its spread from that region to the rest of the world, nearly impossible. In many countries, the end of aid opens the door wider to ==predatory== Chinese loans and propaganda. As one USAID official explained: “My job literally was countering China, providing development assistance in a much nicer, kinder, partnership way to local people who were being pressured and had their arms twisted.” When 70 Afghan students in central Asia, mostly women, had their scholarships to American universities suddenly suspended and in some cases their plane tickets canceled, the values of freedom and open inquiry lost a bit of their attractiveness. The American college administrator responsible for the students told me, “Young people who are sympathetic to the United States and share our best values are not only not being welcomed; they’re having the door slammed in their faces.”

Most Americans don’t want to believe that their government is taking life saving medicine away from sick people in Africa, or betraying Afghans who sacrificed for this country. They might disapprove of foreign aid, but they want starving children to be fed. This native ==generosity== explains why Trump and Musk have gone to such lengths to ==clog== the internet with falsehoods and hide the consequences of their cruelty. The only obstacle to ending American soft power isn’t Congress, the bureaucracy, or the courts, but public opinion.

One of the country’s most popular programs is the resettlement of refugees. For decades, ordinary American citizens have welcomed the world’s most ==persecuted== and desperate people—European Jews after World War II, Vietnamese after the fall of ==Saigon== , Afghans after the fall of Kabul. Refugees are in a separate category from most immigrants: After years of waiting and ==vetting== by U.S. and international agencies, they come here legally, with local sponsors. But Trump and his adviser Stephen Miller see them as no different from migrants crossing the southern border. The flurry of executive orders and memos has halted the processing of all refugees and ended funding for resettlement. The story has received little attention.

Here’s what the program’s shutdown means: I spoke with an Afghan special-forces captain who served alongside Americans— when Kabul was about to fall in 2021, he prevented armed Taliban at the airport from seizing U.S. weaponry, but he was left behind during the evacuation.

Arrested by the new regime, the captain was imprisoned for seven months and suffered regular and severe torture, including the ==amputation== of a ==testicle== . He managed to escape with his family to Pakistan in 2023 and was near the end of being processed as a refugee when Trump took office. He had heard Trump criticize the Biden administration for leaving military equipment behind in Afghanistan. Because he had worked to prevent that from happening, he told me, “that gave me a hope that the new administration would value my work and look at me as a valuable person, a person who is aligned with all the administration is hoping to achieve, and that would give a chance for my kids and family to be moved out safely.” Biden’s ==ineptitude== ==stranded== the captain once;

Trump’s ==coldheartedness== is doing it again.

A sense of loyalty and compassion isn’t ==extraneous== to American identity; it is at the core of national pride, and its betrayal exacts a cost that can’t be easily measured. The Biden administration created a program called Welcome Corps that allows ordinary Americans to act as resettlement agencies. (My wife and I participated in it.) In Pennsylvania, a retiree named Chuck Pugh formed a sponsor group to bring an Afghan family here, and the final medical exam was completed just before Inauguration Day. When resettlement was abruptly ended, Pugh found himself wondering, Who are we? I know what I want to think, but I’m just not sure. The sponsor group includes Pugh’s sister, Virginia Mirra. She and her husband are ==devout== Christians and ==ardent== Trump supporters. In early February, when I asked her how she felt about the suspension of the refugee program, she sounded surprised, and disappointed—she hadn’t heard the news. “I feel sad about that,” she said. “It does bother me. It’s starting to sink in. With these people in danger, I would wonder if there would be an exception made for them. How would we go about that?” Her husband frequently sends American-flag lapel pins to Trump, and I suggested that he write the president about the Afghan family. “I will talk to my husband tonight,” Mirra said. “And I will continue to pray that the Lord will protect them and bring them to this country by some means. I do believe in miracles.”

Vocabulary, phrases and sentences

Words Chinese Definition Phonetic Symbol
dismantle 拆除;拆卸;废除 /dɪsˈmæntl/
repurpose 将…用于新的目的;重新利用 /ˌriːˈpɜːrpəs/
roll them up 把它们卷起来 /rəʊl ðem ʌp/
be rife with corruption 充满腐败 /biː raɪf wɪð kəˈrʌpʃn/
polio 小儿麻痹症 /ˈpəʊlioʊ/
whiz 能手;专家 /wɪz/
seize 没收;查封 /siːz/
be placed on indefinite leave 被无限期停职 /biː pleɪst ɒn ɪnˈdefɪnət liːv/
pseudonym 笔名;假名 /ˈsjuːdənɪm/
authoritarian 独裁主义的;专制的 /ɔːˌθɒrəˈteəriən/
civil servant 公务员 /ˈsɪvl ˈsɜːvənt/
bare - bone 最低限度的 /ˈbeə bəʊn/
dismemberment 肢解;分割;瓜分 /dɪsˈmembəmənt/
veteran 老兵;老手;退伍军人 /ˈvetərən/
brutal 残忍的;野蛮的;冷酷的 /ˈbruːtl/
a curtain fall over the public information 对公众信息的掩盖 /ə ˈkɜːtn fɔːl ˈəʊvə ðə ˈpʌblɪk ˌɪnfəˈmeɪʃn/
outpour 倾泻;流出;流露 /ˈaʊtpɔː(r)/
distortion 扭曲;变形;失真;曲解 /dɪˈstɔːʃn/
outright 完全地;彻底地;公然地 /ˈaʊtraɪt/
falsehood 谎言;虚假;不实 /ˈfɔːlshʊd/
grant 奖学金 /ɡrɑːnt/
wrecking crew 破坏小组;拆除队 /ˈrekɪŋ kruː/
inclusion 包容 /ɪnˈkluːʒn/
genocide 种族灭绝;大屠杀 /ˈdʒenəsaɪd/
orthodoxy 正统观念;正统做法;正教 /ˈɔːθədɒksi/
terminology 术语;专门用语 /ˌtɜːmɪˈnɒlədʒi/
contest 争辩;质疑 /ˈkɒntest/ (动词)/ˈkɒntest/(名词)
champion 支持;捍卫 /ˈtʃæmpiən/(名词)/ˈtʃæmpiən/(动词)
executioner 刽子手;行刑者 /ˈeksɪkjuːʃənə(r)/
waiver 放弃;弃权;豁免 /ˈweɪvə(r)/
heedlessness 不注意;粗心大意 /ˈhiːdləsnəs/
wrecker 破坏者;肇事者;使船遇难的人 /ˈrekə(r)/
statutory 法定的;法规的;依照法令的 /ˈstætʃətri/
skeletal 骨骼的;骨瘦如柴的;梗概的 /ˈskelɪtl/
humanitarian 人道主义的;博爱的;慈善的 /hjuːˌmænɪˈteəriən/
envision 想象;设想;展望 /ɪnˈvɪʒn/
blitzkrieg 闪电战 /ˈblɪtskriːɡ/
bomber 轰炸机;投弹手 /ˈbɒmə(r)/
defenseless 无防御能力的;无助的 /dɪˈfensləs/
assault 攻击;袭击;突击 /əˈsɔːlt/
eviscerate 取出内脏;切除;彻底摧毁 /ɪˈvɪsəreɪt/
pluralism 多元主义;多元论;多元化 /ˈplʊərəlɪzəm/
postwar 战后的 /ˈpəʊstwɔː(r)/
coercion 强制;强迫;高压政治 /kəʊˈɜːʃn/
leviathan Leviathan 海中怪兽;庞然大物 /lɪˈvaɪəθən/
a fat target 一个容易攻击的目标 /ə ˈfæt ˈtɑːɡɪt/
wage 开展;发动;进行;工资 /ˈweɪdʒ/(动词)/ˈweɪdʒ/(名词)
counterinsurgency 反叛乱;平叛 /ˌkaʊntərɪnˈsɜːdʒənsi/
toasted the repressive 为镇压者干杯(这里意译就是支持镇压者) /ˈtəʊstɪd ðə rɪˈpresɪv/
shah (伊朗)国王 /ʃɑː/
antagonize 使对抗;使敌对;引起…的敌意 /ænˈtæɡənaɪz/
arrogance 傲慢;自大 /ˈærəɡəns/
bloat 使膨胀;使肿胀;肿胀;臃肿;膨胀 /ˈbləʊt/
chastened 受到惩罚后变得克制的; chastise(惩罚)的过去分词 /ˈtʃeɪsnd/
a plus - size Norway 一个大号挪威(形象说法,指左派幻想的像挪威那样温和的美国) /ə ˈplʌs saɪz ˈnɔːweɪ/
isolationist 孤立主义的 /ˌaɪsəˈleɪʃənɪst/
messianic 有救世主情结的;弥赛亚的 /ˌmesiˈænɪk/
superpower 超级大国 /ˈsuːpəpaʊə(r)/
enlightened 开明的;有见识的 /ɪnˈlaɪtnd/
selfinterest 自身利益 /ˈself ˈɪntrəst/
benign 良性的;和蔼的;温和的 /bɪˈnaɪn/
efficacy 功效;效力;效能 /ˈefɪkəsi/
slander 诽谤;诋毁 /ˈslændə(r)/
imperialist 帝国主义的 /ɪmˈpɪəriəlɪst/
unilaterally 单方面地 /ˌjuːnɪˈlætrəli/
disarm 解除武装;裁军;使无害 /dɪsˈɑːm/
gut 取出内脏;毁坏内部;勇气;胆量;直觉 /ˈɡʌt/
transactional 交易的;事务性的 /ˈtrænzækʃənl/
dispense 分配;分发;施予;执行;免除 /dɪˈspens/
nicety 细微之处;精确性;美好 /ˈnaɪsəti/
a strip - down 精简;缩减 /ə ˈstrɪp daʊn/
deportation 驱逐出境;放逐 /ˌdepɔːˈteɪʃn/
resentment 怨恨;愤恨 /rɪˈzentmənt/
cohort 一群人;一组;同生群 /ˈkəʊhɔːt/
pallid 苍白的;暗淡的;无生气的 /ˈpælɪd/
shortsightedness 近视;目光短浅 /ˈʃɔːtsaɪtɪdnəs/
incuriosity 无好奇心;不感兴趣 /ˌɪnkjʊəriˈɒsəti/
bonfire 篝火;营火 /ˈbɒnfaɪə(r)/
predatory 掠夺性的;食肉的;捕食性的 /ˈpredətri/
clog 堵塞;阻塞 /ˈklɒɡ/
persecuted 受迫害的;persecute(迫害)的过去分词 /ˈpɜːsɪkjuːtɪd/
Sigon 西贡(可能是特定名称) /ˈsaɪɡən/
vet 审查;检查;诊疗;兽医;老兵 /ˈvet/(动词)/ˈvet/(名词)
amputation 截肢;切断 /ˌæmpjuˈteɪʃn/
impetitude 急躁;鲁莽 /ɪmˈpetɪtjuːd/
strand 使搁浅;使滞留;线;股;缕 /ˈstrænd/
devout 虔诚的;笃信宗教的;热忱的 /dɪˈvaʊt/
ardent 热情的;热烈的;炽热的 /ˈɑːdənt/

Comment and share

Ireland’s Contribution to English

Nearly everyone knows that countries such as the United Kingdom, the United States of America, Canada, Australia, and New Zealand are primarily English-speaking countries; that is, English is the mother tongue used in these countries. What is less well known is that English is also the mother ==tongue== in countries such as the Republic of Ireland (officially called Eire), Barbados, Jamaica, Trinidad, and Guyana. Among these latter few, the Irish have made contributions to the English language in both its ==lexicon== and literature which can ==be considered second to none== .

==Virtually== every aspect of English literature has been graced by the writings of the Irish. This fact is all the more amazing because Ireland is a relatively small country, with never more than four million people throughout its long history. Yet many great “English” writers were indeed born and often raised in Ireland, though many, too, immigrated to the United Kingdom at some point in their lives. Among these pillars of English literature were Jonathan Swift, William Butler Yeats, James Joyce, Samuel Beckett, Oscar Wilde, George Bernard Shaw, and Edmund Burke. Many other lesser-known figures have ==punctuated== English literature as well. These men’s contributions to the English language and to Western thought in general are ==immeasurable== . A review of two of these writers’ major works will reveal why.

Jonathan Swift (1667 -1745) by most reckoning is the best English-language satirist ever, and one of the world’s greatest as well. Born in Ireland of English parents, Swift went to school there through his bachelor’s degree (Trinity College, Dublin, capital of Ireland). Thereafter he frequently Traveled between England and Ireland, including years spent at Oxford College, where he earned his master’s degree. Swift wrote a great deal of poetry, but he is best regarded as a ==prose== ==satirist== . He wrote ==prolifically== both in Ireland and England, nearly constantly shuttling from one to the other. In Ireland he worked on Gulliver’s Travels, which he later had published in England in 1726. Already famous by that time, Swift would become ==immortalized== with this last great work. What child does not know the story of the brave sailor Gulliver as he travels through lands in which he is at turn both a giant and a ==midget== ? Yet most readers are not aware of Swift’s intent to satirize the political, academic, and religious leaders of his time. Read either way, Swift’s genius as a writer of English cannot be denied.

A giant of English Theater was George Bernard Shaw(1856 - 1950) . Born in Dublin, Shaw moved to England with his family when he was 20 and stayed there for most of the rest of his long life. His early fiction writing was so poor that he could not find a publisher. Only when he began to work as a ==playwright== did his ==fortunes== improve. Among the many, many plays for which Shaw is famous, perhaps his most lasting (though not his most critically acclaimed) is Pygmalion (1916), the story of a language teacher who attempts to” civilize” a young ==prostitute== by training her to speak correctly. If this story sounds familiar, it should: ==Pygmalion== was later filmed winning on Oscar for Shaw and later again transformed into the highly popular Broadway musical My Fair Lady (1956). A good story never dies: the original Pygmalion has since been updated in the hit movie Pretty woman (1990) starring Richard Gere and Julia Roberts. As with Shakespeare, many of Shaw’s plays are continually restaged or rewritten into new media because Shaw wrote on many themes which touch on the human condition, ==independent of time and space== .

Among the ==constellation== of Irish talents, perhaps Swift and Shaw are two among the more brilliant stars, but much more could be written of those mentioned above and many others. Though English literature written by the British suffices as an eternal and shining ==canon== of literature, it would be nonetheless ==dimmer== without the considerable talents of its Irish contributors

Vocabulary & Idioms

  • tongue——语言
  • lexicon——全部词汇
  • be second to none——无人出其右
  • virtually——几乎
  • punctuate——不时打断
  • immeasurable——不可估量的
  • prose——散文
  • immortalize——永垂不朽
  • midget——侏儒
  • playwright——剧作家
  • fortune——前途
  • prostitute——妓女
  • Pygmalion——《茶花女》
  • independent of time and space——独立于时间和空间
  • constellation——星座
  • canon——精品
  • dimmer——暗淡的

Comment and share

使用for循环批量创建文件夹

1
for i in {2..9}; do cp 0.01 0.0$i -r ; done

使用sed命令不打开文件而进行替换

1
sed '3s/0.01/0.02/g' ICNAR

对第三行(3)出现的所有0.01(g,全局替换)进行替换(s表示替换操作),替换为0.02,只输出替换后的结果

sed ‘3/0.01/0.02/g’ INCAR > INCAR最后什么也没有

加上-i参数可以直接进行编辑

结合for循环和sed批量命名

1
2
3
4
5
6
7
8
9
10
11
[storm@cachyos-x8664 ex03]$ for i in *; do sed -i "3s/0.05/$i/g" $i/INCAR ; done
[storm@cachyos-x8664 ex03]$ grep SIGMA */INCAR
0.01/INCAR:SIGMA = 0.01
0.02/INCAR:SIGMA = 0.02
0.03/INCAR:SIGMA = 0.03
0.04/INCAR:SIGMA = 0.04
0.05/INCAR:SIGMA = 0.05
0.06/INCAR:SIGMA = 0.06
0.07/INCAR:SIGMA = 0.07
0.08/INCAR:SIGMA = 0.08
0.09/INCAR:SIGMA = 0.09

使用双引号以读取变量的值

注意这里使用的是英文括号而不是花括号

1
for i in $(seq 8 2 16); do cp 888/POSCAR ${i}${i}${i}/POSCAR; done

“提交任务的命令”

1
yhbatch -p gsc -N 1 -J test job_sub 

找能量的命令

1
2
3
grep  without OUTCAR | tail -n 1
grep ' without' OUTCAR | tail -n 1 # 本人常用的是这个
grep sigma OUTCAR | tail -n 1

提交任务,多个文件夹

1
for i in *; do cd $i ; vasp1; cd $OLDPWD; done

alias vasp1=‘mpirun -n 8 vasp’

输出时间信息

1
for i in *0; do echo -e  $i "\t" $(grep User $i/OUTCAR | awk '{print $4}'); done

绘图脚本

1
2
3
4
5
6
7
8
9
import matplotlib.pyplot as plt
import numpy as np

x,y = np.loadtxt('data.dat', delimiter = ',',
usecols=(0,1), unpack=True)
plt.xlabel('ENCUT / eV')
plt.ylabel('Ttme / S')
plt.plot(x,y, 'rs-', linewidth=2.0)
plt.show()

在vim中进行替换

1
: 10,30s/$/T T T/g

$表示每一行的末尾

提取能量(用制表符TAB进行分隔)

1
2
3
4
5
for i in [0-9]*/; do
dir=${i%/}
energy=$(grep ' without' "$dir/OUTCAR" | tail -n 1 | awk '{print $7}')
printf "%s\t%s\n" "$dir" "$energy"
done > data

Comment and share

记录一下维也纳第一性原理计算软件包(VASP)的学习过程,有点乱、、、

计算一个体系会出现两种优化过程

  • 电子结构的优化
    • 迭代求解薛定谔方程来获得体系能量极小值的一个过程
  • 几何结构的优化
    • 在电子结构优化的结果上,获取原子的受力情况,然后根据受力情况,调节原子的位置,再进行电子结构优化,获取新的受力情况,然后再调节原子位置,一直重复这样的过程,直至找到体系势能面上一个极小值的过程

OSICAR用于记录优化过程的信息

INCAR中设置ALGO参数可以指定算法

ZVALPOTCAR中对应元素的价电子

查看K点的个数:

1
grep irreducible OUTCAR

固体物理中,费米能级对应的是最高电子占据轨道的能量,也就是HOMO

以下情况需要考虑自旋极化

  • 单原子的计算
  • O2 分子(基态为三重态)
  • 自由基相关的计算
  • 含Fe,Co, Ni 的体系
  • 要计算的体系具有磁性:顺磁,铁磁,反铁磁等,要打开自旋极化。
  • 当关注体系的电子性质时,且自己不知道加或者不加的时候,建议加上

EDIFF 控制电子步(自洽)的收敛标准,在O原子的计算中,由于我们不需要优化,直接进行静态计算,完全由EDIFF控制计算的收敛情况

EDIFFG控制离子步的收敛标准

  • 对于优化,我们可以使用力作为收敛标准,此时EDIFFG为负值。一般来说取值在-0.01到-0.05之间(-0.01对于力收敛来说已经是一个很严格的要求了)。
  • 当然,对于较大的体系,我们也可以使用能量作为标准:此时,EDIFFG 为正值,一般取值范围在0.0001-0.001即可。

单点计算、静态计算、自洽计算:几何结构计算前后不发生变化

IRBION优化分子结构

一般来说,优化结构的时候有3个选择:

  • IBRION=3:你的初始结构很差的时候;
  • IBRION=2:共轭梯度算法,很可靠的一个选择,一般来说用它基本没什么问题。
  • IBRION=1:用于小范围内稳定结构的搜索。

CONTCAR包含优化完之后的信息

频率计算的作用

  • 确定结构是否稳定;
  • 看振动方式和大小,用来和实验对比,棋博士最新的文章就是一个非常好的例子;
  • 反应热,反应能垒,吸附能等的零点能矫正;
  • 确认过渡态(有一个振动的虚频)
  • 热力学中计算entropy,用于计算化学势,微观动力学中的指前因子和反应能垒。

频率分析的关键参数

1
2
3
IBRION = 5 #之前设置的2
NFREE = 2 #新加入的参数
POTIM = 0.02 #减小了数值

怎么确定POSCAR中的原子?——比如乙醇中的羟基氢是POSCAR中的哪一个呢???

晶胞&&原胞

7种晶系与14种布拉维点阵:简单三六菱,单斜底,四方体

NWRITE用来控制输出文件的详细程度

1
2
3
NWRITE = 0 # 最小输出
NWRITE = 1 #中等
NWRITE = 2 #详细输出

ISTART用来初始化波函数

1
2
ISTART = 1 #读取WAVECAR续算
ISTART = 0 #从零开始算

单纯从数据库中获取的结构,只能作为一个合理的初始值,与计算所得到的理论结构还有一定的差距,因此我们需要对该结构进行优化才可以获取稳定的晶格参数信息。有两个方法可以实现:

  • 1 Birch-Murnaghan状态方程拟合
  • 2 VASP计算中通过调节ISIF参数直接优化Bulk

Birch-Murnaghan方程 $$ E(a)=E_0+\dfrac{9V_0B_0}{16}([(\frac{a_0}{a})^2-1]^3B_0^{'}+[(\dfrac{a_0}{a})-1]^2[6-4(\frac{a_0}{a})^2]) $$

$$ (\dfrac{V_0}{V})^{\frac{2}{3}}=(\dfrac{a_0^3}{a_{actual}^3})^{\frac{2}{3}}=(\dfrac{a_0}{a_{actual}})^2 $$

$$ x=\dfrac{1}{(a\times 2.8664)^2} $$

a代表缩放系数,2.8664是晶胞参数

除了用B-M方程拟合来确定晶格常数之外,还可以使用直接优化法确定晶格常数:ISIF = 3 + ENCUT

  • ISIF=2(默认):优化原子位置
  • ISIF=3:优化原子位置 + 晶胞形状/体积。

单点计算误区

  • 单点计算(NSW=0IBRION=-1)时无需设置 ISIF=0,因为离子已固定。
  • 错误设置 ISIF=0 会禁用应力计算,可能导致后续分析缺失数据。

为何需要增大 ENCUT

  • Pulay Stress:
    • 定义:当晶胞体积变化时,平面波基组不完整导致的应力误差。
    • 后果:晶格优化结果不准确。
    • 解决方法
      1. 保持体积不变(BM 方程拟合法)
      2. 增大 ENCUT(直接优化法)
  • 规则
    • 设置 ENCUT = 1.3 * max(ENMAX)ENMAX 取自 POTCAR
    • 示例:Fe 的 ENMAX=267.882 eVENCUT=350 eV(但文档设置为 600 eV,更保守)

DOS态密度计算需要使用更多的K点

A high quality DOS requires usually very fine k-meshes.

ISMEAR的选择

  • 对于半导体和绝缘体体系,ISMEAR的值取绝对不能大于0, 一般用0;
  • 对所有体系,如果想获取更加精确能量的时候用-5,但这时候如果K点数目小于3,程序则会罢工;
  • K 点少,半导体或者绝缘体,那么只能用 ISMEAR = 0;
  • 在DOS能带计算中,使用ISMEAR= -5 用于获取精确的信息。
  • 对于金属来说,ISMEAR的取值一般为>=0 的数值(0,1,2);
  • 保守地说,ISMEAR = 0 (Gaussian Smearing) 可以满足大部分的体系(金属,导体,半导体,分子);
  • 如果不知道怎么取ISMEAR,直接用0是一个很保险的做法。也可以测试不同的值对计算的影响,但是新手的话,即使测试完了,也不知道根据什么去判断对结果的影响。

电子数的积分区间是从负无穷到费米能级

各种参数的作用

ISTART——确定是否读取 WAVECAR 文件

ISTART = 0 | 1 |2 |3

默认值

  • 如果存在WAVECAR则读取: ISTART = 1
  • 强制不读取WAVECAR,从头算: ISTART = 0

ISTART = 2,读取WAVECAR,截断能原胞不发生改变

ICHARG——确定 VASP 如何构造初始电荷密度

ICHARG = 0 | 1 |2 | 4 | 5

  • ICHARG = 0,默认值,从初始波函数计算电荷密度
  • ICHARG = 1,从 CHGCAR 文件中读取电荷密度,并使用原子电荷密度的线性组合从旧位置(在 CHGCAR 上)外推到新位置
  • ICHARG = 2,默认值,以原子电荷密度的叠加为例

PREC——指定精度模式

PREC = Normal | Single | SingleN | Accurate | Low | Medium | High

  • PREC = Normal,默认
  • PREC = Single
  • PREC = SingleN
  • PREC = Accurate

LREAL——确定投影算子是在实空间还是在倒数空间中求值

LREAL = .FALSE. | Auto (or A) | On (or O) | .TRUE.

  • LREAL = .FALSE. 默认值,倒数空间投影,小体系,精确
  • LREAL=Auto 在实空间中进行投影,全自动优化投影算子(几乎不需要用户干扰)

ALGO——指定电子最小化算法或选择 GW 计算类型的便捷选项。

ALGO = Normal | VeryFast | Fast | Conjugate | All | Damped | Subrot | Eigenval | Exact | None | Nothing | CHI | G0W0 | GW0 | GW | scGW0 | scGW | G0W0R | GW0R | GWR | scGW0R | scGWR | ACFDT | RPA | ACFDTR | RPAR | BSE | TDHF

默认值: Normal

ENCUT——指定以 eV 为单位设置的平面波基的能量截止

ENCUT = [real]

默认为POTCAR中的ENMAX,但是官方==强烈建议==在 INCAR 文件中始终手动指定能量截止 ENCUT,以确保计算之间的准确性相同。否则,不同计算之间的默认 ENCUT 可能会有所不同(例如,对于内聚能的计算),结果是无法比较总能量。

ISMEAR——能带展宽方法

ISMEAR = -15 | -14 | -5 | -4 | -3 | -2 | -1 | 0 | [integer]>0

默认值:1

ISMEAR 决定如何为每个轨道设置部分占据数 fnk ,SIGMA 以电子伏特(eV)为单位确定展宽的宽度

以下是来自AI的比喻解释:


ISMEAR:决定如何给电子“打分”

  • 问题:电子在能级上的分布是离散的(像楼梯台阶),但实际计算时需要用连续函数去“平滑”这些台阶。
  • ISMEAR 就是选择“平滑方式”的方法:
    • ISMEAR = -5:采用Blöchl修正的四面体方法,无展宽,严格按台阶处理(绝对精确,但只适用于绝缘体/半导体,速度慢)
    • ISMEAR = 0:采用高斯展宽,用高斯函数“模糊”台阶边缘(适合半导体/绝缘体,平衡精度和速度)
    • ISMEAR = 1:默认值,用更复杂的函数模糊台阶(适合金属,容忍更多模糊,计算快)

2. SIGMA:展宽的“宽容度”

  • 问题ISMEAR 选择用高斯函数模糊时,SIGMA 决定模糊的程度(就像PS里“高斯模糊”的半径)
  • SIGMA 越小:模糊范围越小,越接近真实台阶(精度高,但容易震荡,收敛难)
  • SIGMA 越大:模糊范围越大,电子分布越平滑(容易收敛,但可能掩盖真实细节)

到底怎么设置?一句话总结

体系类型 推荐 ISMEAR 推荐 SIGMA 注意事项
绝缘体/半导体(原子、分子) 0(绝对不能大于零) 0.05~0.1 不要用 ISMEAR=1,会引入误差!
金属 1 0.1~0.2 SIGMA 太小会导致震荡!
能带/DOS计算 -5 不用设置(不展宽) 仅适用于绝缘体,且需要密集 K 点!
  • 保守地说,ISMEAR = 0 (Gaussian Smearing) 可以满足大部分的体系(金属,导体,半导体,分子);
  • 如果不知道怎么取ISMEAR,直接用0是一个很保险的做法。也可以测试不同的值对计算的影响,但是新手的话,即使测试完了,也不知道根据什么去判断对结果的影响。

常见错误

  1. 对绝缘体用 ISMEAR=1 → 结果完全错误!
  2. SIGMA 太大(比如 0.5) → 电子分布过度平滑,能量不准。
  3. 对金属用 ISMEAR=0 → SCF 难收敛,疯狂报错!

举个具体例子

假设你计算 硅(半导体): - 正确设置

1
2
ISMEAR = 0
SIGMA = 0.05
- 错误设置

1
2
ISMEAR = 1   # 会引入非物理的金属性!
SIGMA = 0.5 # 能量误差可能大到 1 eV!


终极口诀

  • 绝缘体/半导体ISMEAR=0 + 小 SIGMA(0.05~0.1)
  • 金属ISMEAR=1 + 稍大 SIGMA(0.1~0.2)
  • 画能带/DOSISMEAR=-5(别动 SIGMA)

IBRION——确定在计算过程中晶体结构如何变化(如何调整原子位置来寻找能量最低点)

Default: IBRION = -1 for NSW=−1 or 0

​ = 0 else

  • 无变化,IBRION = -1 (避免在 NSW>0 时将 IBRION 设置为-1,以防止相同结构被重新计算 NSW 次)
  • 分子动力学,IBRION = 0
  • 结构优化
    • 准牛顿法, IRBION =1
    • 共轭梯度, IBRION =2
    • 阻尼分子动力学,IBRION = 3
  • 计算声子
    • IBRION=5 无对称性的有限差分
    • IBRION=6 具有对称性的有限差分
    • IBRION=7 无对称性微扰理论
    • IBRION=8 具有对称性的微扰理论
  • 分析过渡态
    • IBRION = 40 内禀反应坐标计算
    • IRBION = 44 改进的dimer方法

NSW——描述离子步长的最大数量

NSW = [integer]

Default: NSW = 0

POTIM——设置分子动力学中的时间步长或离子弛豫中的步长宽度

IBRION确定了在计算过程中晶体结构如何变化,如何寻找最低点(“山谷”),POTIM就是“每次移动的距离”

  • 如果IBRION = 0,则必须设置POTIM
    • 对于 IBRION=0,POTIM 给出了所有从头开始分子动力学运行的时间步长(以 fs 为单位),因此必须提供它,否则 VASP 在启动后立即崩溃。
  • 如果IBRION = 1,2,3,默认值为0.5
    • 对于 IBRION=1、2 和 3,分别对应于使用拟牛顿算法、共轭梯度算法和阻尼分子动力学的离子弛豫,POTIM 标签作为步长宽度的缩放常数。准牛顿算法对该参数的选择特别敏感
  • 如果IRBION = 5,6,默认值为0.015
    • 对于 IBRION=5 和 6,使用有限差分方法进行声子计算,其中 POTIM 是计算 Hessian 矩阵的每个离子位移的宽度。

POTIM 太大 → 跨步太大,可能跳过最低点(震荡不收敛)POTIM 太小 → 移动太慢,优化耗时

NCORE——确定在单个轨道上工作的计算核心数量

默认值:NCORE = 1

NCORE的设置可以优化计算资源,降低内存用量(但有可能降低计算速度),如果体系非常小那就可以不用设置,直接并行即可

1
mpirun -n 'core numbers' vasp

NFREE——根据 IBRION,NFREE 指定离子收敛运行历史中记住的步数,或冻结声子计算中的离子位移数

LDIPOL——开启对势能和力的修正

LDIPOL 开启对势能和力的修正。可应用于具有净偶极矩的带电分子和平板

LDIPOL = .TRUE. | .FALSE.

默认值:LDIPOL = .FALSE.

偶极子的存在与周期性边界条件相结合,会导致总能量随超胞大小的收敛速度缓慢。此外,有限尺寸误差会影响势能和力。通过在 INCAR 文件中设置 LDIPOL=.TRUE. 可以抵消这种影响。对于 LDIPOL=.TRUE.,会添加一个线性校正,对于带电的晶胞,会添加一个二次静电势到局部势中,以校正由周期性边界条件引入的误差。激活此标签时,==必须指定标签 IDIPOL,也可以选择指定标签 DIPOL==

这种模式的最大优点是力中的主导误差得到了修正,并且可以针对非对称平板评估功函数。缺点是向电子基态的收敛可能会==显著减慢==,也就是说,可能需要更多的电子迭代来获得所需的精度

IDIPOL——开启对特定方向或所有方向的总能量的单极/偶极和四极校正

IDIPOL = 1 | 2 | 3 | 4

IDIPOL = 1-3,仅分别沿第一、第二或第三晶格矢量方向计算偶极矩,此标志应用于平板计算,表面法线为设置 IDIPOL 的方向,并可选择使用 DIPOL 标签指定平板的质心

IDIPOL = 4,将计算所有方向上的全偶极矩,对孤立分子进行计算时使用此标志

ISPIN——控制自旋极化

ISPIN = 1 | 2

默认:ISPIN = 1,执行非自旋极化计算

ISPIN = 2,执行自旋极化计算(共线)

对于非共线计算,忽略 ISPIN。在 VASP 6.5.0 中,如果 ISPIN = 2 且 MAGMOM 与 LNONCOLLINEAR=.TRUE. ==结合使用==,计算将以错误消息退出

NELM——最大电子步收敛

默认值等于60

LWAVE——决定在运行结束时波函数是否写入 WAVECAR 文件

LWAVE = [logical] 默认值:LWAVE = .NOT. LH5 | .TRUE.

一般情况不开,文件巨大、、、

巨大的WAVECAR

lCHARG——决定是否写入电荷密度(CHGCAR & CHG)

LCHARG = .NOT.LH5 | .TRUE. 默认值:LCHARG = .NOT. LH5

ADDGRID——决定是否使用额外的辅助网格来评估增强电荷

ADDGRID = .TRUE. | .FALSE. 默认值:ADDGRID = .FALSE.

==因此,我们建议进行细致的测试,以验证 ADDGRID 是否按预期工作;请不要默认在所有计算中使用此标签!==

LASPATH——控制局域非球面性修正的参数

看不懂思密达、、、

LASPH = .TRUE. | .FALSE.

默认值:LASPH = .FALSE.

  • 开启 LASPH = .TRUE.
    • 在计算交换关联能时,计入原子周围电子密度的 非球面性贡献(如 d/f 轨道的非对称分布)。
    • 修正总能量、力和应力,尤其在强各向异性体系中影响显著。
    • 增加计算量(约10%-30%耗时),但对精度提升可能至关重要。

LVHAR——确定局部势能Vionic(r)+Vhartree是否写入LOCPOT文件

默认值:LVHAR = .FALSE.

LORBIT——选择一种投影到局部量子数(lm)上的方法,并写入 PROCAR/PROOUT 文件

  • 作用:决定是否计算并输出原子轨道的投影波函数(投影到球谐函数或特定轨道),以及如何输出局域态密度(LDOS)。
  • 输出文件:主要影响PROCARDOSCAR文件的内容(若LORBIT≥10还会生成LOCPOT等文件)
功能说明
0 默认值,不计算轨道投影(仅输出总能带和总态密度)。
1 计算原子轨道的投影(写入PROCAR),但不分解到具体轨道(如s/p/d)。
2 分解到轨道角动量(s/p/d/f)的投影,但不分磁量子数(如px/py/pz不分开)。
10 类似LORBIT=1,但额外输出LOCPOT文件(包含局域势信息)。
11 类似LORBIT=2,但额外输出LOCPOT文件。
12 最常用:分解到磁量子数(如px/py/pz分开),适合详细轨道分析。

LASPH——控制赝势计算中是否考虑非球面贡献

主要影响交换关联势(XC Potential)电荷密度(Charge Density)的计算精度

默认值:LASPH = .FALSE.

作用:决定是否在计算中考虑电子密度和势场的非球对称部分(即角动量 l > 0 的贡献)。

  • LASPH = .TRUE.,VASP会计算电子密度和势场的高阶角动量分量(如 d, f 轨道),提升精度。
  • LASPH = .FALSE.(默认值),仅考虑球对称部分(l = 0),计算更快但可能损失部分精度

MDALGO——指定分子动力学模拟算法

(当 IBRION = 0 且 VASP 使用-Dtbdyn 编译时才启用)

MDALGO = 0 | 1 | 2 | 3 | 4 | 5 | 11 | 21 | 13

MDALGO 取值 恒温器 / 模拟方式 适用系综 设置要点
0 标准分子动力学 NVE 设置 IBRION=0、TEBEG、POTIM、NSW;MDALGO=0;SMASS=-3
1 安徒生恒温器 NVT 设置 IBRION=0、TEBEG、POTIM、NSW;MDALGO=1;选择合适的 ANDERSEN_PROB
2 Nose-Hoover 恒温器 NVT 设置 IBRION=0、TEBEG、POTIM、NSW;MDALGO=2;选择合适的 SMASS
3 朗之万恒温器 NVT、NpT NVT 模拟:设置 IBRION=0、TEBEG、POTIM、NSW;ISIF=2;MDALGO=3;在 POSCAR 文件通过 LANGEVIN_GAMMA-tag 指定摩擦系数 NpT 模拟:设置 IBRION=0、TEBEG、POTIM、NSW;ISIF=3;MDALGO=3;在 POSCAR 文件通过 LANGEVIN_GAMMA-tag 指定摩擦系数;通过 LANGEVIN_GAMMA_L-tag 指定晶格自由度摩擦系数;通过 PMASS-tag 设置晶格自由度质量;可通过 PSTRESS-tag 定义外部压力
4 Nose Hoover chains 恒温器 NVT 设置 IBRION=0、TEBEG、POTIM、NSW;ISIF=2;MDALGO=4;选择 NHC_NCHAINS 和 NHC_PERIOD
5 CSVR 恒温器 NVT 设置 IBRION=0、TEBEG、POTIM、NSW;ISIF=2;MDALGO=5;选择 CSVR_PERIOD
13 多个安徒生恒温器 - 在 POSCAR 文件按顺序定义子系统原子位置;设置 NSUBSYS 定义每个子系统的最后一个原子;设置 TSUBSYS 定义每个子系统的模拟温度;设置 PSUBSYS 定义每个子系统原子的碰撞概率(0≤PSUBSYS≤1)

SMASS——在从头算分子动力学运行期间控制速度。

SMASS = -3 | -2 | -1 | [real] ≥ 0

Default: SMASS = -3

对于SMASS = -3,模拟了一个微正则系综(NVE系综)

Tip: To calculate an NVE ensemble we instead recommend to use MDALGO = 1 and ANDERSEN_PROB = 0.0

对于 SMASS = -2,初始速度保持恒定。这使得能够计算一组不同线性相关位置(例如冻结声子或具有不同键长的二聚体)的能量。

注意:如果 SMASS = -2,实际采取的步数为 POTIM×(从 POSCAR 文件读取的速度)。为避免歧义,请将 POTIM 设置为 1

IVDW参数——控制范德华修正

DFT中,标准的交换关联泛函(如PBE、LDA)无法准确描述范德华力,因此需要通过额外的修正方法来处理

默认不启用范德华修正

  • IVDW = 0:不启用范德华修正(默认值)。
  • IVDW = 1:启用DFT-D2方法(Grimme的DFT-D2修正)。
  • IVDW = 10:启用DFT-D3方法(Grimme的DFT-D3修正,不带Becke-Johnson阻尼)。
  • IVDW = 11:启用DFT-D3方法(带Becke-Johnson阻尼,即DFT-D3(BJ))。
  • IVDW = 12:启用DFT-D4方法(Grimme的DFT-D4修正)。
  • IVDW = 20:启用Tkatchenko-Scheffler (TS)方法。
  • IVDW = 21:启用Tkatchenko-Scheffler with self-consistent screening (TS-SCS)方法。

Comment and share

如题,记录一下在计算时遇到的各种报错

2025.05.14

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 -----------------------------------------------------------------------------
| |
| EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR ### ### ### |
| E R R R R O O R R ### ### ### |
| E R R R R O O R R ### ### ### |
| EEEEE RRRRRR RRRRRR O O RRRRRR # # # |
| E R R R R O O R R |
| E R R R R O O R R ### ### ### |
| EEEEEEE R R R R OOOOOOO R R ### ### ### |
| |
| ERROR FEXCF: supplied exchange-correlation table |
| is too small, maximal index : 7355 |
| |
| ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- |
| |
-----------------------------------------------------------------------------

删除NPAR = 1参数

Comment and share

NASA’s first software engineer: Margaret Hamilton - Matt Porter and Margaret Hamilton

At roughly 4 PM on July 20, 1969, ==mankind was just minutes away from landing on the surface of the moon== .

But before the astronauts began their final ==descent== , an emergency alarm lit up.

Something was ==overloading== the computer and threatened to ==abort the landing== .

Back on Earth, Margaret Hamilton held her breath.

She’d led the team developing the pioneering in-flight software, so she knew this mission ==had no room for error== .

But the ==nature== of this last-second emergency would soon prove her software was working exactly as planned.

Born 33 years earlier in Paoli, Indiana, Hamilton had always been ==inquisitive== .

In college, she studied mathematics and philosophy before taking a research position at the Massachusetts Institute of Technology to pay for grad school.

Here, she encountered her first computer while developing software to support research into the new field of chaos theory.

Next, at MIT’s Lincoln Laboratory, Hamilton developed software for America’s first ==air defense system== to search for enemy aircraft.

But when she heard that renowned engineer Charles Draper was looking for help sending mankind to the moon, she immediately joined his team.

NASA ==looked to== Draper and his group of over 400 engineers to invent the first ==compact== digital flight computer, the Apollo Guidance Computer.

Using input from astronauts, this device would be responsible for guiding, navigating, and controlling the spacecraft.

At a time when unreliable computers filled entire rooms, the AGC needed to operate without any errors and ==fit in one cubic foot of space== .

Draper divided the lab into two teams: one for designing hardware and one for developing software.

Hamilton led the team that built the ==on-board== flight software for ==both the Command and Lunar Modules== .

This work, for which she ==coined== the term “software engineering,” was incredibly ==high stakes== .

==Human lives were on the line== , so every program had to be perfect.

Margaret’s software needed to quickly detect unexpected errors and recover from them in real time.

But this kind of adaptable program was difficult to build, since early software could only process jobs in a ==predetermined== order.

To solve this problem, Margaret designed her program to be “ ==asynchronous== ,” meaning the software’s more important jobs would interrupt less important ones.

Her team assigned every task a unique priority to ensure that each job occurred in the correct order and at the right time—regardless of any surprises.

After this breakthrough, Margaret realized her software could help the astronauts work in an ==asynchronous== environment as well.

She designed ==Priority Displays== that would interrupt astronauts’ regularly scheduled tasks to warn them of emergencies.

The astronaut could then communicate with Mission Control to determine the best path forward.

This marked the first time flight software communicated directly—and asynchronously—with a pilot.

It was these ==fail-safes== that triggered the alarms just before the lunar landing.

Buzz Aldrin quickly realized his mistake—he’d ==inadvertently== flipped the ==rendezvous== radar switch.

This radar would be essential on their journey home, but here it was using up vital computational resources.

Fortunately, the Apollo Guidance Computer was well equipped to manage this.

During the overload, the software restart programs allowed only the highest priority jobs to be processed—including the programs necessary for landing.

The Priority Displays gave the astronauts a choice: to land or not to land.

With minutes to spare, Mission Control gave the order.

The Apollo 11 landing was about the astronauts, Mission Control, software, and hardware all working together as an integrated system of systems.

Hamilton’s contributions were essential to the work of engineers and scientists inspired by President John F. Kennedy’s goal to reach the Moon.

And her life-saving work ==went far beyond== Apollo 11—no bugs were ever found in the in-flight software for any crewed Apollo missions.

After her work on Apollo, Hamilton founded a company that uses its unique universal systems language to create breakthroughs for systems and software.

In 2003, NASA honored her achievements with the largest financial award they’d ever given to an individual.

And 47 years after her software first guided astronauts to the moon, Hamilton was awarded the Presidential Medal of Freedom for changing the way we think about technology. # Vocabulary, Phrases and Sentences

Words Chinese Definition Phonetic Symbol
mankind was just minutes away from landing on the surface of the moon
descent
overload
abort the landing
had no room for error
nature
inquisitive
air defense system
look to
compact
fit in one cubic foot of space
on-board
both the Command and Lunar Modules
coin
high stake
Human lives were on the line
predetermined
asynchronous
priority display
fail-safe
inadvertently
rendezvous
went for beyond
Words Chinese Definition Phonetic Symbol
mankind was just minutes away from landing on the surface of the moon 人类距离登上月球表面只有几分钟了 /ˈmæŋkaɪnd wəz dʒʌst ˈmɪnɪts əˈweɪ frəm ˈlændɪŋ ɒn ðə ˈsɜːfɪs ɒv ðə muːn/
descent 下降;降落;血统 /ˈdiːsent/
overload 使超载;使负担过重 /ˈəʊvələʊd/
abort the landing 中止着陆 /əˈbɔːt ðə ˈlændɪŋ/
had no room for error 没有犯错的余地 /ˈhæd nəʊ ruːm fɔːr ˈerə(r)/
nature 自然;本性;性质 /ˈneɪtʃə(r)/
inquisitive 好奇的;好问的 /ɪnˈkwɪzətɪv/
air defense system 防空系统 /ˈeə(r) dɪˈfens ˈsɪstəm/
look to 指望;依靠;注意 /ˈlʊk tuː/
compact 紧凑的;紧密的;简洁的 /ˈkɒmpækt/
fit in one cubic foot of space 能装进一立方英尺的空间 /ˈfɪt ɪn wʌn ˈkjuːbɪk fuːt ɒv speɪs/
on-board 在船上;在飞机上;在板上 /ˈɒnˈbɔːd/
both the Command and Lunar Modules 指挥舱和登月舱 /ˈbəʊθ ðə kəˈmɑːnd ænd ˈluːnə(r) ˈmɒdjuːlz/
coin 硬币;创造(新词语) /ˈkɔɪn/
high stake 高风险;高赌注 /ˈhaɪ steɪk/
Human lives were on the line 人的生命危在旦夕 /ˈhjuːmən laɪvz wəz ˈɒn ðə laɪn/
predetermined 预先确定的;预定的 /ˈpriːdɪˈtɜːmɪnd/
asynchronous 异步的 /ˈeɪsɪŋkrənəs/
priority display 优先级显示 /ˈpraɪˈɒrəti dɪˈspleɪ/
fail-safe 故障安全的;自动防故障的 /ˈfeɪlˈseɪf/
inadvertently 不经意地;无意中 /ˌɪnədˈvɜːtəntli/
rendezvous 会合;约会地点 /ˈrɒndɪvuː/
went far beyond 远远超出

Comment and share

相、相变和相图

锂电池中的相?——有助于获得==晶体结构与组成==

关注材料的e物相,包括晶体结构、化学组成、结晶度、固液态

从电子自旋态来看,==3d电子常常具有自旋长程关联作用==,表现出不同的磁性状态

==磁态来解释充放电过程中的异常情况==

  • 一级相变
  • 二级相变

大部分固态相变属于一级相变,只有少部分属于二级相变

显著平台——一级相变

保持固溶体——二级相变

NIPP钠电池正极

前驱体的合成可能出现杂相

温度和相组成是最重要的两个参量(others:高压、磁场、电场、机械搅拌)

高压法一级固相合成法制备偏铝酸锂

==LiAlO2==具有较高化学稳定性和热吻星星

==六方相R-3m==正极材料,α − NaFeO2结构,相容性比较好,可用作包覆材料,包覆后形成固溶体很难表征

高压LiMn2O4和Li2MnO3

锂电正极非常关键的程序是——煅烧

电解质中的相变

目前主要采用液体电解质和聚合物胶体电解质(有机液体、固态)

低温熔融盐:离子液体

相转变型电解质

当温度升高时,分子晶体中的位置有序可能出现三种情况:

  1. 塑性晶体——长程有序,短程无序
    1. 非离子型
    2. 离子型
  2. 液晶

在Tg之上的

液态电解液的的运输:溶剂化效应与去溶剂化效应

固态电解质尽量选软一点的,贴合得比较好

NASCION(锂离子快离子导体)相变

按照缺陷类型和相变机制可以将固态电解质分为三类

  • 点缺陷
  • 一级相变
  • 二级相变

既可做正极材料又可作固态电解质

固态电解质

  • 足够多的空位
  • 好的晶体结构
  • 协同传输效应

负极材料的相变

将锂插入层间可得到LiC24

极端条件下的低温电池

锂电池的工作原理

+:磷酸铁锂

-:石墨

  • 锂离子从晶格中脱出
  • 溶剂化
  • 去溶剂化
  • 插层

低温失活原理

  • 电解液凝固失活
  • 离子导电性降低
  • 界面去溶剂化减慢
  • 界面层和电极内部传输缓慢

解决

电池结构优化—加热元件

各种外部加热策略:

  • 基于空气
  • 基于液体
  • 基于PCM
  • 基于热管
  • 基于电阻元件
  • 基于帕尔贴效应

各种内加热策略:

  • 直流加热
  • 交流加热
  • 脉冲电流加热
  • 混合电流加热
  • 自加热

溶剂优化—凝固点

  • 降低液体凝固点

  • 液态气体电解液:常温气体、低温液体

低温溶剂可能粘度比较大

基本要求:

  • 液程足够宽
  • 低温下至少0.1 mS/cm
  • 稳定的工作电压>4.5 V

电解液优化方案:

  • 减小溶剂-溶剂相互作用

钠离子电池

经典文献:

  • Time for lithium-ion alternative

  • sodium is the lithium

  • fundamentals,stauts and promise od sodoium-based

能量密度雨锂离子电池有差距,原子质量比较大,原子半径更大造成能量密度低,钠离子迁移更慢导致功率密度低

相对标准电极电位更大,全电池电压较小

  • 单纯扩散脱出
  • 氧化还原机理
  • 金属

体积比容量(mAh/cm),比容量(mAh/g)

液态钠离子电池:

  • 正极=磷酸烦呐+conductive additive

  • 隔膜:玻璃纤维

全固态钠离子电池

  • 正极以后
  • Na负极
  • ISE电解质

提升质量能量密度、提及能量密度,成本降低、安全更高

问题:

  • 表面副反应
  • 接触“缝隙”
  • 体积膨胀加剧破碎
  • 电化学稳定性(电解质不稳定,充放电时发生反应)

固态电解质

关键性能指标

  • Hugh ionic conductivity高离子电导率
  • High stability化学稳定性与电化学稳定性
  • High transference number离子迁移数(0.3-0.4商用锂离子电池,理想情况固态电解质阳离子迁移数=1,阴离子不动,消除浓差极化,聚合物固态电解质在两只之间)
  • Good mechanical property好的机械性能
  • Compatible interface界面相容性,不会发生界面反应
  • 比较低的电子电导率(<10^-9,与离子电导率相差10-6数量级)
  • 宽的电化学窗口
  • 高的电化学阻抗High electronic resistance

聚合物固态电解质

无极固态电解质

  • $\rm{\beta-Al_2O_3}$
  • NASICON钠超离子导体
  • 硼氢化物
  • Perovskite
  • 反式钙钛矿
  • argyrodite
    • 电化学窗口窄(S的性质所决定的)
  • 尖晶石相(Li,La,Zr,O)

离子的体相传输机制

  • 间隙
  • 空位
  • other

晶界

111生长&110生长

电流密度-电势梯度、浓度梯度:能斯特-普朗克方程 $$ \sigma_i=\dfrac{\sigma_o}{T}e^{-\dfrac{E_a}{RT}} $$ 离子电导率和温度、活化能的关系

测阻抗谱计算材料在测

什么样的材料是快离子导体呢(>10mS/cm)

  • 多面体畸变(Jahn-Teller效应)

  • 配位环境决定,迁移到低能量位点(比如尖晶石结构)

  • 阴离子的旋转机制

  • 增大无序度(高熵材料)

离子在晶界处的传输?

钠离子负极处

  • 导电性,能带理论,费米面与导带的位置关系
  • DFT给出SEI膜的稳定性,LiF>LiCl>Li2O

有三种可能存在的界面

  • Stable
  • MCI(离子-电子混合导体)
  • SEI

金属的沉积性质

  • Insufficient Contact
  • Contamination Layers
  • Grain Boundaries
  • Surface Defects

负极和界面的问题

  • 尖端效应导致锂枝晶沿着晶界很快长到电池对面
  • 造成死锂引起短路

失效机制

  • 正极材料颗粒与固态电解质失去接触

储能电池与动力电池

350Wkh/kg——液态电池,固态电池不用隔膜(非活性物质)

  • 正极开裂,正极全固态电池中不同部位的力学性能不同,应变不同

  • 泊松比决定是否容易断裂

  • 力学均一性

  • 第二相结晶强化

锂电池原理与技术

液流电池,在电解液中进行反应

电池能量密度决定因素:容量、电压

  1. 质量轻
  2. 标准电极电势负

枝晶的形成:

传统锂离子电池中,在电场极化下,由于扩散需要时间,靠近电极表面的区域出现Li的缺失,,由于尖端效应,电极表面的坑洼出具有更高的锂沉积优先级,最终形成枝晶,沉积时间成为Sand’s time。

死锂消耗锂,即使0.995的库伦效率,100圈循环后容量保持率仅为60%

2019年Nobel化学奖:Goodenough、Whittingham、Yoshino

Goodenough:LiCoO2、LiFePO4、LiMn2O4

Whittingham:插层反应$\rm TiS_2$的转化反应可以储存锂

Yoshino:焦炭负极,利用焦炭存储锂

==电拓扑化学==

锂电池的四大焦虑:

  • 里程焦虑
  • 价格焦虑
  • 安全焦虑
  • 温度焦虑

三种常见的电池结构:

  • 扣式电池
    • 正极壳
    • 正极材料
    • 隔膜
    • 锂金属片
    • 垫片
    • 弹簧片
    • 负极壳
  • 软包电池
  • 柱状电池

插层式锂离子电池(也被叫做摇椅电池)的结构:graphene|EC&DC|LiCoO2

脱锂:Co(+3)—>Co(+4),插入graphene并接收从LiCoO2从外电路来的电子变成LiC6

电压上升(充电)=正极(上升)-负极(下降)

最主要的储存锂的方式还是插层 储存锂

常见的正负极材料:

  • 正极
    • 钴酸锂
    • 锰酸锂
    • 磷酸铁锂
  • 负极
    • 石墨(以及软碳、硬碳,在钠离子电池用的比较多,因为钠的体积比锂大、钠的插层化合物不稳定(主要原因),导致插层时石墨剥离)
    • 钛酸锂

DoD:deepth of discharge放电深度

Current rate: A/g

Current density: $ \rm cm^2/s$,对于一个耗时100s的实验,考虑一维/二维/三维?

菲克第二定律的目标是简历浓度c(差)随时间和空间变化的函数, $$ \dfrac{\partial C_0(x,t)}{\partial t}=-D_0\nabla^2C_0 $$

离子扩散系数测量方法:GITT(更准确)、CV、交流阻抗法

前者可以精确到电极表面的扩散,后者不是特别准确

离子迁移数: t + t+ = 1 Grotthus机制:氢键的断裂和重组进行传输

不符合Fick定律的情况:离子液体、

电解液、界面和界相

电解质的现代定义:离子导体电子绝缘体

典型实例:

  • 氯化钠(离子载体ionophore)
  • 醋酸(中性分子,离子源ionogen)
  • 熔融氯化钠(熔融盐molten salt),高温热电池可能使用
  • 固体电解质:LiPSCl,具有开放的孔道、缺陷等,热扰动进行传输

水具有“双极结构”,能够同时“吸引”阳离子和阴离子

而其他溶剂比如碳酸乙烯酯的结构是“单极子”(空间位阻引起)

介电常数: $$ \varepsilon=\dfrac{X_v}{X_s} $$

  • 分子为真空电场强度
  • 分母为填充溶剂分子的空间电场强度
  • 真空为1
  • 分子对称性越差,一般极性越大,介电常数越大
  • 介电常数本身是由分子间作用力影响的:ion-dipole、dipole-dipole、H-bond

真空中带电荷的平行极板之间存在电场,带有溶剂时,部分电场能被消耗用于重新极化溶剂分子取向。

如果电场方向翻转过快,那么溶剂分子反转速度可能无法跟上,偶极子的贡献就会逐渐消失。

离子溶剂化的动态模型——溶剂化鞘

  • 第一溶剂化鞘,平均溶剂分子数目成为溶剂化数,能够感受中央离子的电场,因此具有取向性
  • 第二溶剂化鞘
  • 本体溶剂,不受中心离子影响,但受外电场影响

溶剂化鞘模型引入后的结果是施加的电场遇到的阻力减小了。

溶剂化数:

  • 锂:6

  • 钠:4

  • 氢:10

  • 镁:14

离子强度

水溶液中的真实情况偏离了Arrhenius理论,提出了离子强度的概念 $$ I=\dfrac{1}{2}\sum_{i=1}^nc_iz_i^2 $$ Molarity:摩尔浓度(物质的量浓度)

Molality:质量浓度,在高浓度电解液中,体积会发生变化

离子氛

表征中央离子对外围的影响(描述带相反电荷的离子分布情况)——离子氛

  • 将电解液视为由一个中心离子及周围环境组成的二元体系,除中心离子外,其他离子均为失去独立性而融合成的一个弥散环境

这种假设的情况,符合Poisson方程 $$ \dfrac{1}{r^2}\dfrac{d}{dr}(r^2\dfrac{d\varphi_r}{dr})=-\dfrac{4\pi}{\varepsilon}\rho_r $$ 离子氛的有效厚度——德拜厚度 $$ K^{-1}=\sqrt{\dfrac{\varepsilon k_BT}{\sum_in_i^0z_i^2e_0^2}} $$ 较高的离子强度和浓度会使德拜半径减小,高温使德拜半径扩大

基于修订后的德拜厚度,可以得到活度系数的表达式

  • 稀溶液:<0.01 M
  • 中等浓度电解质: 1 M
  • 高浓度电解质: >2 M
  • 超浓缩电解质:>5 M

双电层

  • Helmholtz-Perrin模型,均匀电荷分布,电荷层大概是一个离子的直径厚度
  • Gouy-Chapman,既有极板静电吸引的离子又有自身吸引的离子
  • Stern模型,加入范德华修正
  • Grahame模型,溶剂化阳离子层外还有弥散阳离子层
  • Brckris-Devanathan-Mullen模型,内IHP层(溶剂分子),外OHP层(溶剂化离子),弥散层

界面与界相

  • 界面:定向分布的排布层,没有新的产物生成

  • 界相:生成新的产物

如何判断电解液是否合适?

  • 测试一:循环伏安法
  • 测试二:线性伏安法

电解液不稳定分解后产生过电势

最理想的SEI:LiF(电子绝缘体)、Li2O(离子导体)

Comment and share

Starry Sky

in 沉思录

周三了,突然发现这学期的课好无聊,两门实验课。物理化学实验原理稍显复杂,并且放入的原理其实并没有特别重要,唯一需要操心的就是整个流程原理和数据分析。可能只有用Origin分析数据、联系的时候会稍稍提起一点兴趣吧,实验报告其他地方是一点都不想写,抄书真无聊~、、、

Comment and share

John Doe

author.bio


author.job


Changchun, China