Author Topic: DREIDING Calculator error  (Read 3289 times)

0 Members and 1 Guest are viewing this topic.

Offline karolina2

  • Regular QuantumATK user
  • **
  • Posts: 10
  • Country: gb
  • Reputation: 0
    • View Profile
DREIDING Calculator error
« on: August 14, 2022, 03:51 »
I encountered the following error while trying to run Time-Stamped Force-Bias Monte Carlo calculations using DREIDING Calculator:

Traceback (most recent call last):
  File "n73_p3_175toluene_175tetralin_NPT_MC.py", line 23441, in <module>
    calculator = potential_builder.createCalculator(bulk_configuration)
  File "zipdir/NL/Calculators/ExternalCalculators/ClassicalCalculators/DreidingPotentialBuilder.py", line 1240, in createCalculator
  File "zipdir/NL/Calculators/ExternalCalculators/ClassicalCalculators/EEMAtomicCharges.py", line 594, in charges
  File "zipdir/NL/CommonConcepts/PhysicalQuantity.py", line 1915, in __setitem__
ValueError: shape mismatch: value array of shape (316,) could not be broadcast to indexing result of shape (1,)

I am wondering what is wrong and how to fix it.

The system contains cnt, few units of polymer, and solvent. The initial configuration was created using packmol and optimized and equilibrated using ReaxFF. I defined the static bonds in the system.

This is how my input looks like below static bonds definitions:


bond_constraint = BondConstraint([[ Nitrogen,  Sulfur],
                     [ Nitrogen,  Carbon]],  inversion_order=8, rotation_order=5)

com_constraint = FixCenterOfMass()

# -------------------------------------------------------------
# DREIDING Calculator
# -------------------------------------------------------------
potential_builder = DreidingPotentialBuilder()
potential_builder.assignAtomTypes(bulk_configuration)
calculator = potential_builder.createCalculator(bulk_configuration)
bulk_configuration.setCalculator(calculator)

bulk_configuration.update()
nlsave('test6.hdf5', bulk_configuration)

# -------------------------------------------------------------
# Time-Stamped Force-Bias Monte Carlo
# -------------------------------------------------------------

method = ForceBiasMonteCarloNPTBerendsen(
    temperature=300*Kelvin,
    max_atom_displacement=0.05*Angstrom,
    heating_rate=0*Kelvin,
    pressure=1*bar,
    barostat_factor=500,
    compressibility=0.0001*bar**-1,
)

tfmc_trajectory = TimeStampedForceBiasMonteCarlo(
    bulk_configuration,
    constraints=[com_constraint],
    trajectory_filename='test6.hdf5',
    steps=100000,
    log_interval=5000,
    method=method,
)

bulk_configuration = tfmc_trajectory.lastImage()
nlsave('test6.hdf5', tfmc_trajectory)

The MC calculation runs when I delete solvent molecules from system.