本文整理汇总了Python中gpaw.grid_descriptor.GridDescriptor.get_boxes方法的典型用法代码示例。如果您正苦于以下问题:Python GridDescriptor.get_boxes方法的具体用法?Python GridDescriptor.get_boxes怎么用?Python GridDescriptor.get_boxes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpaw.grid_descriptor.GridDescriptor
的用法示例。
在下文中一共展示了GridDescriptor.get_boxes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GridDescriptor
# 需要导入模块: from gpaw.grid_descriptor import GridDescriptor [as 别名]
# 或者: from gpaw.grid_descriptor.GridDescriptor import get_boxes [as 别名]
from __future__ import print_function
import numpy as np
from gpaw.grid_descriptor import GridDescriptor
from gpaw.localized_functions import create_localized_functions
from gpaw.spline import Spline
s=Spline(0, 1.2, [1, 0.6, 0.1, 0.0])
a = 4.0
n = 24
gd = GridDescriptor((n, n, n), (a, a, a))
print(gd.get_boxes((0, 0, 0), 1.2, 0))
if 0:
p = create_localized_functions([s], gd, (0.0, 0.0, 0.0), cut=True)
a = np.zeros((n, n, n))
p.add(a, np.array([2.0]))
print(a[1,0])
示例2: GridDescriptor
# 需要导入模块: from gpaw.grid_descriptor import GridDescriptor [as 别名]
# 或者: from gpaw.grid_descriptor.GridDescriptor import get_boxes [as 别名]
import numpy as np
from gpaw.grid_descriptor import GridDescriptor
from gpaw.localized_functions import create_localized_functions
from gpaw.spline import Spline
s=Spline(0, 1.2, [1, 0.6, 0.1, 0.0])
a = 4.0
n = 24
gd = GridDescriptor((n, n, n), (a, a, a))
print gd.get_boxes((0, 0, 0), 1.2, 0)
if 0:
p = create_localized_functions([s], gd, (0.0, 0.0, 0.0), cut=True)
a = np.zeros((n, n, n))
p.add(a, np.array([2.0]))
print a[1,0]