Dear Admin,
I am trying to call partial charges on configuration inside a hook method as:
def post_step_hook(step, time, configuration, forces, stress):
PC=PartialCharges(configuration)
md_trajectory = MolecularDynamics(
bulk_configuration,
constraints=constraints,
trajectory_filename='File1.hdf5',
steps=3000,
log_interval=10,
post_step_hook=post_step_hook,
method=method
)
But I get the following error:
Traceback (most recent call last):
File "Electric_Field_F_Migration.py", line 923, in <module>
md_trajectory = MolecularDynamics(
File "zipdir/NL/Dynamics/MolecularDynamics/MolecularDynamics.py", line 776, in MolecularDynamics
File "zipdir/NL/Dynamics/MolecularDynamics/HookFunctionContainer.py", line 252, in callAllHookFunctions
File "Electric_Field_F_Migration.py", line 914, in post_step_hook
PC=PartialCharges(configuration)
File "zipdir/NL/Analysis/PartialCharges.py", line 85, in __init__
File "zipdir/NL/Analysis/Analysis.py", line 282, in __init__
File "zipdir/NL/Analysis/Analysis.py", line 253, in _supportConfigurationWithCalculator
File "zipdir/NL/Analysis/Analysis.py", line 209, in _supportConfiguration
File "zipdir/NL/Analysis/AnalysisUtilities.py", line 176, in checkConfiguration
NL.ComputerScienceUtilities.Exceptions.NLTypeError: The parameter 'configuration' must be an instance of one of the following: BulkConfiguration, MoleculeConfiguration, DeviceConfiguration
Kindly help in this case, as how to calculate partialcharges inside hook?