Skip to content

Commit

Permalink
some changes from a while ago...
Browse files Browse the repository at this point in the history
  • Loading branch information
juditzador committed Jan 18, 2021
1 parent 9906f09 commit 5ab1b60
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kinbot/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ def do_optimization(self):
if self.sconf == 1: # conf search is finished
# if the conformers were already done in a previous run
# not clear what the purpose of these lines were
#if self.par['conformer_search'] == 1:
# status, lowest_conf, geom, low_energy, conformers, energies = self.species.confs.check_conformers(wait=self.wait)
if self.par['conformer_search'] == 1:
status, lowest_conf, geom, low_energy, conformers, energies = self.species.confs.check_conformers(wait=self.wait)

while self.restart <= self.max_restart:
# do the high level calculations
Expand Down
2 changes: 1 addition & 1 deletion kinbot/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, inpfile=None):
# nwchem-specific parameter
'methodclass': 'dft', # or scf or mp2
# Command for the quantum chemistry code
'qc_command': 'g09',
'qc_command': 'g16',
# Quantum chemistry method to use as L1
'method': 'b3lyp',
# Basis set to use
Expand Down
1 change: 1 addition & 0 deletions kinbot/reaction_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ def search_intra_OH_migration_Exocyclic_F(self, natom, atom, bond, rad):
"""
This is the same as search_intra_OH_migration but for double bonds only
0 .....-2-1
R=R~~~~~~~O-OH <==> R=R~~?? + ??~~=O
|
OH
Expand Down
58 changes: 58 additions & 0 deletions reactions/reac_intra_OH_migration_Exocyclic_F.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
from kinbot.reac_General import GeneralReac
from kinbot.geometry import calc_dihedral


class IntraOHMigrationExocyclicF(GeneralReac):
max_step = 14
scan = 0
skip = 1
dihstep = max_step - 2

def __init__(self, species, qc, par, instance, instance_name): # special
GeneralReac.__init__(self, species, qc, par, instance, instance_name)
self.cistrans = self.instance[-1] # (nominal) cis -1, trans -2
self.double = self.instance[0] # the dangling atom with double bond
self.instance = self.instance[1:-1] # cut off both
self.dih0, _ = calc_dihedral(self.species.geom[self.double], # the original dihedral
self.species.geom[self.instance[0]],
self.species.geom[self.instance[1]],
self.species.geom[self.instance[2]])

def get_constraints(self, step, geom):
fix = []
change = []
release = []
if step < self.max_step:
self.fix_bonds(fix)
#if self.cistrans == -1:
# self.fix_dihedral_single(self.double, self.instance[0], self.instance[1], self.instance[2], fix)
#else:
if self.cistrans == -2:
val = self.dih0 + 180. / self.max_step * step
self.set_dihedral_single(self.double, self.instance[0], self.instance[1], self.instance[2], val, change)

if step < self.dihstep:
self.set_dihedrals(change, step)

elif step == self.dihstep:
self.fix_dihedrals(fix)
#self.set_dihedral_single(self.instance[0], self.instance[-1], self.instance[-2], self.instance[-3], 0., change)
self.set_angles(change)

elif step == self.dihstep + 1:
self.release_angles(release)
self.release_dihedrals(release)

if self.species.atom[self.instance[0]] == 'C':
fval1 = 1.5
fval2 = 1.9
else:
fval1 = 1.7
fval2 = 2.0

self.set_bond(0, -1, fval1, change)
self.set_bond(-2, -1, fval2, change)

self.clean_constraints(change, fix)

return step, fix, change, release

0 comments on commit 5ab1b60

Please sign in to comment.