material 版 (精华区)
发信人: chumsdock (微笑服务), 信区: material
标 题: Re: 非晶作业:FCC结构原子配位数的python代码
发信站: BBS 听涛站 (Fri Oct 15 13:34:16 2004), 转信
运行结果
0.000000 1 [0, 0, 0]
0.500000 12 [0, 0.5, 0.5]
1.000000 6 [0, 0, 1]
1.500000 24 [1, 0.5, 0.5]
2.000000 12 [0, 1, 1]
2.500000 24 [0, 0.5, 1.5]
3.000000 8 [1, 1, 1]
3.500000 48 [1, 0.5, 1.5]
4.000000 6 [0, 0, 2]
4.500000 12 [0, 1.5, 1.5]
4.500000 24 [2, 0.5, 0.5]
5.000000 24 [0, 1, 2]
5.500000 24 [1, 1.5, 1.5]
6.000000 24 [1, 1, 2]
6.500000 24 [0, 0.5, 2.5]
6.500000 48 [2, 0.5, 1.5]
7.500000 48 [1, 0.5, 2.5]
8.000000 12 [0, 2, 2]
8.500000 24 [2, 1.5, 1.5]
8.500000 24 [0, 1.5, 2.5]
【 在 chumsdock (微笑服务) 的大作中提到: 】
: def fullset(setitem):
: if setitem==[]: return []
: res=[]
: set=setitem
: seq=[0,1,2]
: for i in seq:
: for j in seq:
: if i!=j:
: for k in seq:
: if not (k==j or k==i):
: if [set[i],set[j],set[k]] not in res :
: ...................
--
You were never satisfied
No matter how I tried
※ 来源:·BBS 听涛站 tingtao.net·[FROM: 219.224.174.181]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.642毫秒