SharedProjectRosa / Molecules / Poging 1.ipynbOpen in CoCalc
!python poging1.1.py meoh.xyz meoh-final.xyz bond_list.txt


Hij heeft 720 loops gerunt ['C', 'H', 'H', 'H', 'O', 'H'] [[ 0.135 1.253 1.018] [ 0.67 1.954 0.304] [ 0.946 1.167 1.801] [-0.866 1.716 1.513] [ 0.017 -0.123 0.589] [ 0.017 -0.123 -0.3 ]]
6

C          0.1350000000        1.2530000000        1.0180000000
H          0.6700000000        1.9540000000        0.3040000000
H          0.9460000000        1.1670000000        1.8010000000
H         -0.7660000000        1.6160000000        1.4130000000
O          0.0170000000       -0.1230000000        0.5890000000
H          0.0170000000       -0.1230000000       -0.3000000000

import numpy as np

list=[[1,2],[2,3],[3,4]]

list= np.asarray(list)

list.structure

--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-174-6d74aee7ca2f> in <module>() 5 list= np.asarray(list) 6 ----> 7 list.structure AttributeError: 'numpy.ndarray' object has no attribute 'structure' 
lijst1= [[1,1],[2,2],[3,3]]
#
lijst3=[]

for i in lijst2:
lijst3.append(lijst2[i])

print(lijst3)

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
from itertools import permutations as perm

lijst2= list(range(10000))

c= 0
for i in perm(lijst2):
c += 1

print(c)



Jupyter Kernel terminated: This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as explained here.

lijst1=[1]
print (lijst1)

lijst1.append

[1]
<function list.append>








!python calculator.py str1_initial.xyz str1_final.xyz bond_list.txt

initial file 11 H 0.400530 0.377500 -0.898830 H -1.683990 -1.462620 0.092230 H 1.341640 -1.732830 0.558460 H 0.171180 0.704890 0.869910 H 0.818440 -4.163550 0.939680 H -1.222280 0.858380 -0.268690 C -0.300330 0.282920 -0.042670 C 0.307230 -2.054820 0.476000 C 0.007900 -3.483530 0.700330 C -0.644750 -1.157500 0.178910 O -1.132180 -3.914650 0.621740 final file 11 H 0.400530 0.377500 -0.898830 H -1.683990 -1.462620 0.092230 H 1.341640 -1.732830 0.558460 H 0.171180 0.704890 0.869910 H 0.818440 -4.163550 0.939680 H -1.222280 0.858380 -0.268690 C -0.300330 0.282920 -0.042670 C 0.307230 -2.054820 0.476000 C 0.007900 -3.483530 0.700330 C -0.644750 -1.157500 0.178910 O -0.300330 0.282920 -0.042670 O 0.307230 -2.054820 0.476000 O 0.007900 -3.483530 0.700330 O -0.644750 -1.157500 0.178910
coordinaten= {"c":[["x","y","z"]]}
coordinaten["c"].append(["x","x"])

print (coordinaten["c"])

['x', 'x']
list1= ["0.1","0.2"]
for i,j in enumerate(list1):
list1[i] = float(j)

print (list1)

[0.1, 0.2]
listz=[[1],[2]]

print (listz)

listz.pop(0)

print(listz)

[[1], [2]] [[2]]
!python bonds_reader.py bond_list.txt

['{0 3} {0 4} {0 1} {0 2} {4 5}'] [[0, 3], [0, 4], [0, 1], [0, 2], [4, 5]]


!python inlezen.py meoh.xyz

{'H': [[0.67, 1.954, 0.304], [0.946, 1.167, 1.801], [-0.766, 1.616, 1.413], [0.017, -0.123, -0.3]], 'C': [[0.135, 1.253, 1.018]], 'O': [[0.017, -0.123, 0.589]]}