Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. Fixing bug CREST optimization #207

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aqme/cmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ def compute_cmin(self, file):
if len(self.args.constraints_atoms) >= 1 or len(self.args.constraints_dist) >= 1 or len(self.args.constraints_angle) >= 1 or len(self.args.constraints_dihedral) >= 1:
complex_ts = True
name_init = mol.GetProp('_Name')
name_file_out = '_'.join(name_init.split())
mol, energy, cmin_valid = xtb_opt_main(
f'{self.name}_conf_{i}',
name_file_out,
dup_data,
dup_data_idx,
self,
Expand Down
8 changes: 4 additions & 4 deletions aqme/csearch/crest.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def xtb_opt_main(
if self.args.xtb_keywords is not None:
for keyword in self.args.xtb_keywords.split():
if keyword == "--ohess":
command1.remove("--opt ")
command1.remove("--opt")
command1.append(keyword)

xtb_out1 = f'{os.path.dirname(Path(xyzoutxtb1))}/{os.path.basename(Path(xyzoutxtb1)).split(".xyz")[0]}'
Expand Down Expand Up @@ -215,7 +215,7 @@ def xtb_opt_main(
if self.args.xtb_keywords is not None:
for keyword in self.args.xtb_keywords.split():
if keyword == "--ohess":
command2.remove("--opt ")
command2.remove("--opt")
command2.append(keyword)

xtb_out2 = f'{os.path.dirname(Path(xyzoutxtb2))}/{os.path.basename(Path(xyzoutxtb2)).split(".xyz")[0]}'
Expand Down Expand Up @@ -247,7 +247,7 @@ def xtb_opt_main(
if self.args.xtb_keywords is not None:
for keyword in self.args.xtb_keywords.split():
if keyword == "--ohess":
command.remove("--opt ")
command.remove("--opt")
command.append(keyword)
xtb_out1 = f'{os.path.dirname(Path(xyzin))}/{os.path.basename(Path(xyzin)).split(".xyz")[0]}'
run_command(command, f"{xtb_out1}_xtb1.out")
Expand All @@ -265,7 +265,7 @@ def xtb_opt_main(
comm_xtb = f"export OMP_STACKSIZE={self.args.stacksize} && export OMP_NUM_THREADS={self.args.nprocs},1 \
&& xtb {xyzin} --opt -c {charge} --uhf {int(mult) - 1} {self.args.xtb_keywords} >> {xtb_out1}_xtb1.out"
if " --ohess " in comm_xtb:
comm_xtb.remove("--opt ")
comm_xtb.remove("--opt")
subprocess.call(comm_xtb, shell=False)
os.rename(str(dat_dir) + "/xtbopt.xyz", xyzoutxtb1)
except FileNotFoundError:
Expand Down
2 changes: 1 addition & 1 deletion aqme/qdescp.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __init__(self, **kwargs):
else:
self.args.log.write("x WARNING! No column with SMILES information found in the input CSV file.")
if len(smiles_list) > 0:
mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list if Chem.MolFromSmiles(smiles) is not None]#JDJAJKSHDKHA
mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list if Chem.MolFromSmiles(smiles) is not None]
if len(mols) > 0:
mcs = rdFMCS.FindMCS(mols)
if mcs is not None:
Expand Down