0.1.160
This commit is contained in:
parent
4d87f89519
commit
9ddb69dc61
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.1.159
|
version = 0.1.160
|
||||||
author = guanjihuan
|
author = guanjihuan
|
||||||
author_email = guanjihuan@163.com
|
author_email = guanjihuan@163.com
|
||||||
description = An open source python package
|
description = An open source python package
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.2
|
Metadata-Version: 2.2
|
||||||
Name: guan
|
Name: guan
|
||||||
Version: 0.1.159
|
Version: 0.1.160
|
||||||
Summary: An open source python package
|
Summary: An open source python package
|
||||||
Home-page: https://py.guanjihuan.com
|
Home-page: https://py.guanjihuan.com
|
||||||
Author: guanjihuan
|
Author: guanjihuan
|
||||||
|
@ -9,6 +9,22 @@ def get_coordinate_array_from_atom_object_list(atom_object_list):
|
|||||||
coordinate_array.append([x, y])
|
coordinate_array.append([x, y])
|
||||||
return coordinate_array
|
return coordinate_array
|
||||||
|
|
||||||
|
# 从原子对象列表中获取 x 和 y 的最大值和最小值
|
||||||
|
def get_max_min_x_y_from_atom_object_list(atom_object_list):
|
||||||
|
import guan
|
||||||
|
coordinate_array = guan.get_coordinate_array_from_atom_object_list(atom_object_list)
|
||||||
|
x_array = []
|
||||||
|
for coordinate in coordinate_array:
|
||||||
|
x_array.append(coordinate[0])
|
||||||
|
y_array = []
|
||||||
|
for coordinate in coordinate_array:
|
||||||
|
y_array.append(coordinate[1])
|
||||||
|
max_x = max(x_array)
|
||||||
|
min_x = min(x_array)
|
||||||
|
max_y = max(y_array)
|
||||||
|
min_y = min(y_array)
|
||||||
|
return max_x, min_x, max_y, min_y
|
||||||
|
|
||||||
# 根据原子对象列表来初始化哈密顿量
|
# 根据原子对象列表来初始化哈密顿量
|
||||||
def initialize_hamiltonian_from_atom_object_list(atom_object_list):
|
def initialize_hamiltonian_from_atom_object_list(atom_object_list):
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
Loading…
x
Reference in New Issue
Block a user