diff --git a/qforce/molecule/dihedral_terms.py b/qforce/molecule/dihedral_terms.py index 1e5cece..a8602e2 100644 --- a/qforce/molecule/dihedral_terms.py +++ b/qforce/molecule/dihedral_terms.py @@ -238,7 +238,7 @@ def get_dtype(topo, *args): for atoms in atoms_comb: d_type = get_dtype(topo, *atoms) - phi = get_dihed(topo.coords[atoms])[0] + # phi = get_dihed(topo.coords[atoms])[0] # add_term('rigid', topo, atoms, phi, d_type) add_term('rigid', topo, atoms, 2., np.pi, d_type+'_mult2') @@ -247,13 +247,15 @@ def get_dtype(topo, *args): for r in topo.rings)] for atoms in atoms_in_ring: - phi = get_dihed(topo.coords[atoms])[0] + # phi = get_dihed(topo.coords[atoms])[0] d_type = get_dtype(topo, *atoms) - if abs(phi) < 0.43625: # check planarity < 25 degrees - add_term('rigid', topo, atoms, phi, d_type) - else: - add_term('inversion', topo, atoms, phi, d_type) + add_term('rigid', topo, atoms, 2., np.pi, d_type+'_mult2') + + # if abs(phi) < 0.43625: # check planarity < 25 degrees + # add_term('rigid', topo, atoms, 2., np.pi, d_type+'_mult2') + # else: + # add_term('inversion', topo, atoms, phi, d_type) else: for atoms in atoms_comb: @@ -296,17 +298,16 @@ def get_dtype(topo, *args): # continue imp_type = f"ki_{topo.types[i]}" if abs(phi) < 0.43625: # check planarity < 25 degrees - # add_term('improper', topo, atoms, phi, imp_type) add_term('improper', topo, [atoms[0], atoms[1], atoms[2], atoms[3]], phi, imp_type) add_term('improper', topo, [atoms[0], atoms[1], atoms[3], atoms[2]], phi, imp_type) add_term('improper', topo, [atoms[0], atoms[2], atoms[3], atoms[1]], phi, imp_type) - else: - add_term('inversion', topo, [atoms[0], atoms[1], atoms[2], atoms[3]], phi, imp_type) - add_term('inversion', topo, [atoms[0], atoms[1], atoms[3], atoms[2]], phi, imp_type) - add_term('inversion', topo, [atoms[0], atoms[2], atoms[1], atoms[3]], phi, imp_type) - add_term('inversion', topo, [atoms[0], atoms[2], atoms[3], atoms[1]], phi, imp_type) - add_term('inversion', topo, [atoms[0], atoms[3], atoms[1], atoms[2]], phi, imp_type) - add_term('inversion', topo, [atoms[0], atoms[3], atoms[2], atoms[1]], phi, imp_type) + # else: + # add_term('inversion', topo, [atoms[0], atoms[1], atoms[2], atoms[3]], phi, imp_type) + # add_term('inversion', topo, [atoms[0], atoms[1], atoms[3], atoms[2]], phi, imp_type) + # add_term('inversion', topo, [atoms[0], atoms[2], atoms[1], atoms[3]], phi, imp_type) + # add_term('inversion', topo, [atoms[0], atoms[2], atoms[3], atoms[1]], phi, imp_type) + # add_term('inversion', topo, [atoms[0], atoms[3], atoms[1], atoms[2]], phi, imp_type) + # add_term('inversion', topo, [atoms[0], atoms[3], atoms[2], atoms[1]], phi, imp_type) # add_term('pitorsion', topo, [1, 0, 3, 2, 4, 5], 0, 'test') # add_term('pitorsion', topo, [0, 2, 3, 1, 4, 5], 0, 'test') diff --git a/qforce/pathkeeper.py b/qforce/pathkeeper.py index 2a6cee0..1e0a649 100644 --- a/qforce/pathkeeper.py +++ b/qforce/pathkeeper.py @@ -107,8 +107,8 @@ class Pathways: pathways = Pathlib({ # folders - 'preopt': '0_preopt', - 'hessian': '1_hessian', + 'preopt': 'crest', + 'hessian': 'hessian', 'addstruct': '5_additional', 'hessian_charge': ['hessian', 'charge'], 'hessian_energy': ['hessian', '${idx}_en_conformer'], diff --git a/qforce/qm/crest.py b/qforce/qm/crest.py index 11b4b6d..8789739 100644 --- a/qforce/qm/crest.py +++ b/qforce/qm/crest.py @@ -15,7 +15,8 @@ def from_config(cls, config): return cls() def _commands(self, filename, basename, ncores): - return [f'bash {filename} > {filename}.shellout'] + print(filename, basename) + return [f'bash {filename} > {basename}.out'] class Crest(QMInterface): @@ -169,7 +170,9 @@ def opt(self, file, job_name, settings, coords, atnums): base, filename = os.path.split(name) # Given that the xTB input has to be given in the command line. # We create the xTB command template here. - cmd = f'crest {job_name}_input.xyz {self.config.xtb_command} -T {settings.n_proc} '\ + cmd = f'crest {job_name}_input.xyz --chrg {settings.charge} ' \ + f'--uhf {settings.multiplicity - 1} ' \ + f'{self.config.xtb_command} -T {settings.n_proc} -alpb water\n' # Write the hessian.inp which is the command line input file.write(cmd) # Write the coordinates, which is the standard xyz file. diff --git a/qforce/qm/qm.py b/qforce/qm/qm.py index e72f616..67700e2 100644 --- a/qforce/qm/qm.py +++ b/qforce/qm/qm.py @@ -200,6 +200,7 @@ def get_hessian(self): with open(calculation.inputfile, 'w') as file: self.write_hessian(file, calculation.base, coords, atnums) hessians.append(calculation) + break folder = self.pathways.getdir("hessian") #