# 化學中的數學與程式設計

2006年

## 摘要或動機

When we were learning about organic compounds at school ,there was a unit discussing the isomers of alkane .Our teacher made us practice drawing all the structural formula of the isomers from hexane to nonane .We were much interested in the subject .However ,we often missed or duplicated some isomers .Thus , we began to think if it is possible to find a way by developing programs to let the computer calculate the exact number of the isomers of alkane . After discussion ,we set up a complete coding system .We numbered the isomers in the way that computers could decode and then wrote them in C language. Through computer execution ,the numbers of the isomers from C1 to C20 all match those on the reference website. According to the same concept , we also find a way to calculate the number of alkane with one substituted group . In the future,our goal will be focused on the research of multi- substituted alkane and cyclokane. In addition , the ionic crystal accumulation model are so variable. Take the double face-centered accumulation of NaCl for example, when the ion pairs are extended to the infinity , the potential energy of attractive field will approach a constant which is named as the Madelung Constant. We also managed to write a computer program with C language to approach this convergence with three models, including cube , octahedron , and sphere . The result turned out to be that the data of the sphere was less stable . In the other two models , when “n” is up to 43 layers , the data is identical with that on the reference website to the eight decimal point . 在學校裡學習有機化合物有關烷類異構物這個單元，老師讓我們練習畫出己烷~壬烷的所有異構物結構式，這引起我們極大的興趣！但常一不小心就漏掉或多出幾個，我們開始思考：能不能找到一個方法並設計成程式，讓電腦執行以找出烷類異構物？經過討論，我們建立了一套完整的編碼系統，將各異構物以電腦可解讀的方式編號，並以C 語言寫成程式。透過電腦執行，各碳數化合物自C1至C20都與參考網站吻合。依相同觀念，我們也設計出烷類含一個取代基的異構物數目。將來努力的目標為：多取代基及環烷類之研究！另外，離子晶體堆積模型變化多端，以NaCl 雙面心堆積為例，其引力場位能，當離子對延伸至無限大時，這個值將趨近於一個常數，又稱為馬德隆常數。我們嘗試以C 語言設計電腦程式，用三種模型（正立方體、正八面體、圓球）來逼近並求得這個收斂值。執行結果是：圓球數據較不穩定；而另二種模型到n=43 層以上，其數值大小與參考網路上的數值，在小數點以下8 位完全相同。

「為配合國家發展委員會「推動ODF-CNS15251為政府為文件標準格式實施計畫」，以及 提供使用者有文書軟體選擇的權利，本館檔案下載部分文件將公布ODF開放文件格式， 免費開源軟體可至LibreOffice 下載安裝使用，或依貴慣用的軟體開啟文件。」