Skip to content

Commit

Permalink
protein loading: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjgowers committed Apr 17, 2024
1 parent 7840f4d commit 2425b4c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions gufe/components/proteincomponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,11 @@ def _from_openmmPDBFile(cls, openmm_PDBFile: Union[PDBFile, PDBxFile],
default_valence = periodicTable.GetDefaultValence(atomic_num)

if connectivity == 0: # ions:
if atom_name.upper() in positive_ions:
fc = default_valence # e.g. Sodium ions
elif atom_name.upper() in negative_ions:
fc = - default_valence # e.g. Chlorine ions
elif atom_name.strip(string.digits).upper() in positive_ions:
# catches cases like 'CL1' as name
fc = default_valence
# strip catches cases like 'CL1' as name
if atom_name.strip(string.digits).upper() in positive_ions:
fc = default_valence # e.g. Sodium ions
elif atom_name.strip(string.digits).upper() in negative_ions:
fc = - default_valence
fc = - default_valence # e.g. Chlorine ions
else: # -no-cov-
resn = a.GetMonomerInfo().GetResidueName()
resind = int(a.GetMonomerInfo().GetResidueNumber())
Expand Down

0 comments on commit 2425b4c

Please sign in to comment.