from geometric.molecule import Molecule
from qcengine.compute import compute_procedure
from qcelemental.models import DriverEnum
from qcelemental.models.procedures import TorsionDriveInput, \
QCInputSpecification, OptimizationSpecification
from qcengine.procedures.torsiondrive import TorsionDriveProcedure
from qcelemental.models.common_models import Model
molecule = Molecule('test.xyz')
molecule.build_topology()
result = compute_procedure(
input_data=TorsionDriveInput(
keywords={
"dihedrals": [(2, 0, 1, 5)],
"grid_spacing": [15, ]
},
input_specification=QCInputSpecification(
driver=DriverEnum.gradient,
model=Model(method="UFF", basis=None)
),
initial_molecule=molecule,
optimization_spec=OptimizationSpecification(
procedure="geomeTRIC",
keywords={
"coordsys": "dlc",
"maxiter": 300,
"program": "rdkit",
}
)
),
procedure="torsiondrive"
)
print(result)
WIth test.xyz being
24
Coordinates from ORCA-job CN_H11C12N1_c5eace0d1ccbf515b6a0e1495ea48fe5~2_opt
N -0.14734773330158 0.36427415662708 0.27404221628527
C 0.87642997276114 -0.47337558769163 0.71538193838427
C -1.47305098595612 0.03776706482306 -0.00995605239714
H 0.09454863104194 1.33699089025511 0.17742506764776
C 0.62900540834344 -1.66407989804081 1.41301505118399
C 2.20550910176015 -0.07808479834656 0.50124124155727
C -1.85575540698289 -1.23922285446841 -0.44424080136003
C -2.44889434562448 1.04102614250225 0.08504023282233
C 1.69108875493289 -2.44084190533860 1.85853563179447
H -0.39061227620670 -1.96322348199187 1.63021722109903
C 3.25569101180997 -0.85596488191577 0.96764372725101
H 2.40833739507763 0.84291902436477 -0.04053145738987
C -3.18556592017182 -1.49887595490090 -0.75002594484279
H -1.10838460416432 -2.01520625120065 -0.56987338441668
C -3.77044862428985 0.77132908819139 -0.24166887821415
H -2.16318775569790 2.03445854537413 0.42323208840750
C 3.00941891995621 -2.05014493465937 1.64027773757711
H 1.48020142447713 -3.35838091116040 2.40091373716700
H 4.27692334307468 -0.52999713132821 0.79138794434983
C -4.15377101222979 -0.50322256690238 -0.65079747118207
H -3.46294583844032 -2.49328087055841 -1.08875440208402
H -4.50947357162152 1.56361848133573 -0.16216000040325
H 3.83191130149393 -2.66302440850731 1.99456272492360
H -5.18962719004183 -0.71545695646225 -0.89490916816043
Expected behavior
I got the error.
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "test/run.py", line 12, in <module>
input_data=TorsionDriveInput(
File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for TorsionDriveInput
initial_molecule
value is not a valid list (type=type_error.list)
Additional context
It is kind of hard to debug as there is no documentation for TorsionDriveInput.
Running the original workflow #305 (comment) will not work as well.
Describe the bug I'm interested in running TorsionDrive following the interface of outlined by https://github.com/MolSSI/QCEngine/pull/305#issue-936896576 but couldn't get the procedure to run.
To Reproduce
WIth
test.xyz
beingExpected behavior I got the error.
Additional context It is kind of hard to debug as there is no documentation for
TorsionDriveInput
. Running the original workflow #305 (comment) will not work as well.qcengine.version 'v0.21.0' qcelemental.version 'v0.24.0'