| 5 | 1/1 | 返回列表 |
| 查看: 2106 | 回復(fù): 10 | ||||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||||
baoluolove銅蟲 (小有名氣)
|
[求助]
請(qǐng)問編程計(jì)算配位數(shù)時(shí)如何處理周期性邊界條件? 已有1人參與
|
|||
| 自己按照老虎大王編程思路嘗試編程計(jì)算了配位數(shù),可是發(fā)現(xiàn)和文獻(xiàn)有一定的出入,想想很有可能是沒有處理周期性邊界條件,請(qǐng)問專家們周期性邊界條件如何在編程中進(jìn)行處理的,十分感謝~ |

銅蟲 (小有名氣)

專家顧問 (正式寫手)
![]() |
專家經(jīng)驗(yàn): +49 |
|
Assuming the simulation box lengths along x,y,z directions are lx,ly,lz, you want to calculate the distance between particle i and j while removing the periodic boundary conditions This is what I did in Fortran xij = xi - xj - nint((xi-xj)/lx)*lx yij = yi - yj - nint((yi-yj)/ly)*ly zij = zi - zj - nint((zi-zj)/lz)*lz rij = sqrt(xij*xij + yij*yij + zij*zij) nint is a fortran function that gives the nearest integer of a real number. I'm sure you can find similar functions in C++ or other programing languages. |
木蟲 (正式寫手)
銅蟲 (小有名氣)
![]() |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料工程085601數(shù)二英一335求調(diào)劑 +5 | 雙馬尾痞老板2 2026-03-31 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 080200專業(yè)277分,求帶走! +3 | 瓶子PZ 2026-03-31 | 3/150 |
|
|
[考研] 環(huán)境工程297分求調(diào)劑一志愿杭高院 +6 | GENJIOW 2026-03-31 | 6/300 |
|
|
[考研] 070300一志愿211,312分求調(diào)劑院校 +12 | 小黃鴨寶 2026-03-30 | 12/600 |
|
|
[考研] 318求調(diào)劑 +10 | 陳晨79 2026-03-30 | 10/500 |
|
|
[考研] 307分求調(diào)劑 +6 | (o~o) 2026-03-31 | 6/300 |
|
|
[考研] 086000生物與醫(yī)藥 初試274求調(diào)劑 +4 | 小叮當(dāng)來了 2026-03-30 | 4/200 |
|
|
[考研] 315求調(diào)劑 +6 | akie... 2026-03-28 | 7/350 |
|
|
[考研] 277跪求調(diào)劑 +8 | 1915668 2026-03-27 | 13/650 |
|
|
[考研] 一志愿085600中科院寧波所276分求調(diào)劑 +12 | 材料學(xué)257求調(diào)劑 2026-03-28 | 13/650 |
|
|
[考研] 一志愿中海洋320化學(xué)工程與技術(shù)學(xué)碩求調(diào)劑 +8 | 披星河 2026-03-30 | 8/400 |
|
|
[考研] 哈爾濱工業(yè)大學(xué)材料與化工專碩378求調(diào)劑 +3 | 塔比烏斯 2026-03-30 | 3/150 |
|
|
[考研] 285求調(diào)劑 +6 | AZMK 2026-03-29 | 9/450 |
|
|
[考研] 求調(diào)劑 +10 | 張zz111 2026-03-27 | 11/550 |
|
|
[考研] 一志愿北京工業(yè)大學(xué),324分求調(diào)劑 +6 | 零八# 2026-03-28 | 6/300 |
|
|
[考研] 343求調(diào)劑 +6 | 愛羈絆 2026-03-29 | 6/300 |
|
|
[考研] 356求調(diào)劑 +4 | gysy?s?a 2026-03-28 | 4/200 |
|
|
[考研] 一志愿吉大071010,316分求調(diào)劑 +3 | xgbiknn 2026-03-27 | 3/150 |
|
|
[考研] 321求調(diào)劑 +6 | wasdssaa 2026-03-26 | 6/300 |
|
|
[考研]
|
平樂樂樂 2026-03-26 | 4/200 |
|