You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently doing a torsion scan to improve the dihedrals of some molecules but I'm getting an error regarding the units of the position of the coordinates. I've tried a couple of approaches to fix the problem because the code was working with an earlier release in April or May. I'm currently trying to fix the issue using a diphenylmethane but I haven't been successful. Any input as to what the issue maybe would be useful. Below I pasted the error that I'm getting. Thanks!!
python3.8/site-packages/ParaMol/Tasks/torsions_scan.py in scan_1d(self, interface, restart_settings, system, rdkit_conf, torsion_to_scan, torsions_to_freeze, scan_settings, optimize_qm, optimize_qm_before_scan, optimize_mm, optimize_mm_before_scan, optimize_mm_type, ase_constraints, sampling, rotate_from_initial, n_structures_to_sample, threshold, mm_opt_force_constant, mm_opt_tolerance, mm_opt_max_iter, restart)
468
469 # Set positions of context to last position
--> 470 dummy_context.setPositions(positions * unit.nanometers)
471
472 # Set RDKit geometry to the current in the OpenMM context
python3.8/site-packages/openmm/openmm.py in setPositions(self, positions)
3676
3677 if unit.is_quantity(positions):
-> 3678 positions = positions.value_in_unit(unit.nanometer)
3679
3680
python3.8/site-packages/openmm/unit/quantity.py in value_in_unit(self, unit)
621 Returns underlying value, in the specified units.
622 """
--> 623 val = self.in_units_of(unit)
624 if is_quantity(val):
625 return val._value
python3.8/site-packages/openmm/unit/quantity.py in in_units_of(self, other_unit)
657 """
658 if not self.unit.is_compatible(other_unit):
--> 659 raise TypeError('Unit "%s" is not compatible with Unit "%s".' % (self.unit, other_unit))
660 f = self.unit.conversion_factor_to(other_unit)
661 return self._change_units_with_factor(other_unit, f)
TypeError: Unit "nanometer**2" is not compatible with Unit "nanometer".
The text was updated successfully, but these errors were encountered:
Hi, I'm currently doing a torsion scan to improve the dihedrals of some molecules but I'm getting an error regarding the units of the position of the coordinates. I've tried a couple of approaches to fix the problem because the code was working with an earlier release in April or May. I'm currently trying to fix the issue using a diphenylmethane but I haven't been successful. Any input as to what the issue maybe would be useful. Below I pasted the error that I'm getting. Thanks!!
BFGS: 60 09:36:31 -13673.084137 0.0124
BFGS: 61 09:36:31 -13673.084155 0.0096
TypeError Traceback (most recent call last)
/ipykernel_22881/1791874995.py in
14 mol, paramol_settings, amber_symmetrizer = generate_fresh_system(mol_name)
15 torsion_scan = TorsionScan()
---> 16 torsion_scan.run_task(paramol_settings,
17 [mol],
18 [torsion_to_scan],
python3.8/site-packages/ParaMol/Tasks/torsions_scan.py in run_task(self, settings, systems, torsions_to_scan, scan_settings, interface, torsions_to_freeze, ase_constraints, optimize_qm, optimize_qm_before_scan, optimize_mm, optimize_mm_before_scan, optimize_mm_type, sampling, rotate_from_initial, n_structures_to_sample, dihedral_conservation_threshold, mm_opt_force_constant, mm_opt_tolerance, mm_opt_max_iter, rdkit_conf, restart)
170 if torsional_scan_dim == 1:
171 # Perform 1D Scan
--> 172 scan_angles, qm_energies_list, qm_forces_list, qm_conformations_list, mm_energies_list, mm_conformations_list = self.scan_1d(
173 interface, settings.restart, system, conf, torsions_to_scan[0], torsions_to_freeze, scan_settings[0], optimize_qm, optimize_qm_before_scan,
174 optimize_mm, optimize_mm_before_scan, optimize_mm_type, ase_constraints, sampling, rotate_from_initial, n_structures_to_sample, dihedral_conservation_threshold,
python3.8/site-packages/ParaMol/Tasks/torsions_scan.py in scan_1d(self, interface, restart_settings, system, rdkit_conf, torsion_to_scan, torsions_to_freeze, scan_settings, optimize_qm, optimize_qm_before_scan, optimize_mm, optimize_mm_before_scan, optimize_mm_type, ase_constraints, sampling, rotate_from_initial, n_structures_to_sample, threshold, mm_opt_force_constant, mm_opt_tolerance, mm_opt_max_iter, restart)
468
469 # Set positions of context to last position
--> 470 dummy_context.setPositions(positions * unit.nanometers)
471
472 # Set RDKit geometry to the current in the OpenMM context
python3.8/site-packages/openmm/openmm.py in setPositions(self, positions)
3676
3677 if unit.is_quantity(positions):
-> 3678 positions = positions.value_in_unit(unit.nanometer)
3679
3680
python3.8/site-packages/openmm/unit/quantity.py in value_in_unit(self, unit)
621 Returns underlying value, in the specified units.
622 """
--> 623 val = self.in_units_of(unit)
624 if is_quantity(val):
625 return val._value
python3.8/site-packages/openmm/unit/quantity.py in in_units_of(self, other_unit)
657 """
658 if not self.unit.is_compatible(other_unit):
--> 659 raise TypeError('Unit "%s" is not compatible with Unit "%s".' % (self.unit, other_unit))
660 f = self.unit.conversion_factor_to(other_unit)
661 return self._change_units_with_factor(other_unit, f)
TypeError: Unit "nanometer**2" is not compatible with Unit "nanometer".
The text was updated successfully, but these errors were encountered: