Closed xiki-tempula closed 2 years ago
Hi @xiki-tempula this probably needs documenting somewhere but you need to use the python interface for xtb which is a separate package called xtb-python
. Try adding it to the environment using conda install xtb-python -c conda-forge
.
@jthorton Thank you for the help. I was wondering if you know how to set the number of threads that xTB uses in this script? Thank you.
We haven't needed to do this before, but I think this is what you are looking for https://xtb-docs.readthedocs.io/en/latest/setup.html?highlight=threads#parallelisation.
@jthorton Thank you. If there were to be a keyword to do this. Do you think it would be:
optimization_spec=OptimizationSpecification(
procedure="geomeTRIC",
keywords={
"threads": 16,
"program": "xtb",
}
No, I don't think xtb will respect that see here for supported keywords, @awvwgk will be the best person to confirm how to set the number of threads. Note that this is the number of threads used per gradient calculation, the torsiondrive optimisations are not run in parallel currently.
@jthorton Thanks. I have raised an issue on xtb-python https://github.com/grimme-lab/xtb-python/issues/65 and I kind of want to make sure that the interface that I have purposed makes sense. I have noticed that the majority of time seems to be spent not on the xTB anyway.
@jthorton Thanks for the help.
From my experience with the original torsion drive, geomeTRIC is not a stable optimiser and I usually use the 'native-opt' routine of the torsion drive, which is just doing the geometry optimisation using the QM software is much more stable.
In this case, I wonder how do I ask QCEngine to do the optimisation with constrained dihedral using the xTB? Here is the current script.
result = compute_procedure(
input_data=TorsionDriveInput(
keywords={
"dihedrals": [(2, 0, 1, 5)],
"grid_spacing": [15]
},
input_specification=QCInputSpecification(
driver=DriverEnum.gradient,
model=Model(method="GFN2-xTB", basis=None)
),
initial_molecule=[molecule,],
optimization_spec=OptimizationSpecification(
procedure="geomeTRIC",
keywords={
"program": "xtb",
}
)
),
procedure="torsiondrive"
)
In this case, I wonder how do I ask QCEngine to do the optimisation with constrained dihedral using the xTB?
Unfortunately, the native optimisation method is not currently supported by qcengine but has been talked about in the past and adding support should be possible and I am sure a PR would be welcome to implement it.
@jthorton Thank you. I wonder if procedure="geomeTRIC"
is the only Optimization routine available? Sorry I cannot find the documentation for this.
@jthorton Thanks.
Describe the bug I would like the QCEngine to find the xTB installed with conda.
To Reproduce Create a new environment and install the xtb as well as the QCEngine
conda create -n torsiondrive -c conda-forge rdkit qcengine torsiondrive xtb
Then I tried to use xTB to run the torsiondrive
Expected behavior I got the error
The system is OSX 11.6.2 with intel CPU.