Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Aug 29, 2023
1 parent 4c7144a commit 3081355
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions hoomd_organics/base/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ def mass(self):

@property
def net_charge(self):
return sum(site.charge for site in self.gmso_system.sites)
return sum(
site.charge if site.charge else 0 for site in self.gmso_system.sites
)

@property
def box(self):
Expand Down Expand Up @@ -265,7 +267,12 @@ def _remove_hydrogens(self):

def _scale_charges(self):
""""""
charges = np.array([site.charge for site in self.gmso_system.sites])
charges = np.array(
[
site.charge if site.charge else 0
for site in self.gmso_system.sites
]
)
net_charge = sum(charges)
abs_charge = sum(abs(charges))
for site in self.gmso_system.sites:
Expand Down

0 comments on commit 3081355

Please sign in to comment.