Skip to content

Commit 80e6c05

Browse files
authored
Merge pull request #108 from CCPBioSim/93-improve-test-coverage-for-entropy
Improve Test Coverage for `entropy.py`
2 parents bcbdb24 + 71b670a commit 80e6c05

File tree

2 files changed

+917
-16
lines changed

2 files changed

+917
-16
lines changed

CodeEntropy/entropy.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ def orientational_entropy_calculation(self, neighbours_dict):
822822
# Replaced molecule with neighbour as this is what the for loop uses
823823
S_or_total = 0
824824
for neighbour in neighbours_dict: # we are going through neighbours
825-
if neighbour in []: # water molecules - call POSEIDON functions
825+
if neighbour in ["H2O"]: # water molecules - call POSEIDON functions
826826
pass # TODO temporary until function is written
827827
else:
828828
# the bound ligand is always going to be a neighbour
@@ -835,16 +835,16 @@ def orientational_entropy_calculation(self, neighbours_dict):
835835
f"S_or_component (log(omega)) for neighbour {neighbour}: "
836836
f"{S_or_component}"
837837
)
838-
S_or_component *= self.GAS_CONST
838+
S_or_component *= self._GAS_CONST
839839
logger.debug(
840840
f"S_or_component after multiplying by GAS_CONST for neighbour "
841841
f"{neighbour}: {S_or_component}"
842842
)
843-
S_or_total += S_or_component
844-
logger.debug(
845-
f"S_or_total after adding component for neighbour {neighbour}: "
846-
f"{S_or_total}"
847-
)
843+
S_or_total += S_or_component
844+
logger.debug(
845+
f"S_or_total after adding component for neighbour {neighbour}: "
846+
f"{S_or_total}"
847+
)
848848
# TODO for future releases
849849
# implement a case for molecules with hydrogen bonds but to a lesser
850850
# extent than water

0 commit comments

Comments
 (0)