Skip to content

Commit

Permalink
ling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff231li committed Aug 31, 2023
1 parent b21a6fb commit d34f272
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions paprika/analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,32 +1036,26 @@ def run_ti(self, phase, prepared_data, method):
# Compute forces and store the values of the changing coordinate,
# either lambda or target
if phase == "attach" or phase == "release":
dU[k, 0 : N_k[k]] = (
sum(
[
(k * (val - eq) ** 2)
for k, val, eq in zip(
max_force_constants, ordered_values[k], targets_T[k]
)
]
)
.m_as(self.energy_unit)
)
dU[k, 0 : N_k[k]] = sum(
[
(k * (val - eq) ** 2)
for k, val, eq in zip(
max_force_constants, ordered_values[k], targets_T[k]
)
]
).m_as(self.energy_unit)

# this is lambda. assume the same scaling for all restraints
dl_vals[k] = force_constants_T[k, 0] / max_force_constants[0]
else:
dU[k, 0 : N_k[k]] = (
sum(
[
2.0 * k * (val - eq)
for k, val, eq in zip(
max_force_constants, ordered_values[k], targets_T[k]
)
]
)
.m_as(self.energy_unit / self.distance_unit)
)
dU[k, 0 : N_k[k]] = sum(
[
2.0 * k * (val - eq)
for k, val, eq in zip(
max_force_constants, ordered_values[k], targets_T[k]
)
]
).m_as(self.energy_unit / self.distance_unit)

# Currently assuming a single distance restraint
dl_vals[k] = targets_T[k, 0].m_as(self.distance_unit)
Expand Down

0 comments on commit d34f272

Please sign in to comment.