-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
34 lines (25 loc) · 1016 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
""" Importing structure still messed up with ipython kernel """
try:
import atomicpy
import IFNN
except Exception as e:
print(e)
import os
DIRPATH = os.getcwd()
MOLPATH = os.path.join(DIRPATH,"Molecules")
VdW = atomicpy.AtomInfo().json;
print("Reading initial xyz file")
molA = atomicpy.Molecule(os.path.join(MOLPATH,"Benzene.xyz"));
print("Creating example dummy molecule")
molA.write_dummy()
molB = atomicpy.Molecule(os.path.join(MOLPATH,"Benzene_trans.xyz"))
print("Molecules intialiased preparing optimisation parameters")
# IFFN Class takes in two 'Molecule' classes genetated from atomicpy.Molecule
# VdW is a dictionary containing the known van der Waals radii of elements
run = IFNN.IFNN(molA,molB,VdW)
print("Running single Sequential Least SQuares Programming optimisation")
run.opt()
print("Running 4 basin hopping Sequential Least SQuares Programming optimisations")
run.basinopt(niter=4,display=True)
print("Writing initial and optimised result files")
run.writeAll()