From 5d877530f58f709affbaa1720f11d9e0eb1a6a41 Mon Sep 17 00:00:00 2001 From: MaohuaYang Date: Fri, 13 Oct 2023 14:44:36 +0800 Subject: [PATCH] fix: syntax error and format modified code --- propka/protonate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/propka/protonate.py b/propka/protonate.py index 5b47737..24a3278 100644 --- a/propka/protonate.py +++ b/propka/protonate.py @@ -29,7 +29,7 @@ def __init__(self, verbose=False): self.verbose = verbose self.valence_electrons = { "H": 1, "He": 2, "Li": 1, "Be": 2, "B": 3, "C": 4, "N": 5, - "O": 6, "F": 7, "Ne": 8, "Na": 1, "Mg": 2,"Al": 3, "Si": 4, + "O": 6, "F": 7, "Ne": 8, "Na": 1, "Mg": 2, "Al": 3, "Si": 4, "P": 5, "S": 6, "Cl": 7, "Ar": 8, "K": 1, "Ca": 2, "Sc": 2, "Ti": 2, "V": 2, "Cr": 1, "Mn": 2, "Fe": 2, "Co": 2, "Ni": 2, "Cu": 1, "Zn": 2, "Ga": 3, "Ge": 4, "As": 5, "Se": 6, "Br": 7, @@ -150,7 +150,8 @@ def set_number_of_protons_to_add(self, atom): atom.number_of_protons_to_add = 8 _LOGGER.debug(" 8") if atom.element not in self.valence_electrons: - _LOGGER.warning(f'Unknown valence electron count for element {atom.element}') + _LOGGER.warning(f'Unknown valence electron \ + for element {atom.element}') self.valence_electrons[atom.element] = 4 atom.number_of_protons_to_add -= self.valence_electrons[atom.element] _LOGGER.debug('Valence electrons: {0:>4d}'.format( @@ -182,7 +183,8 @@ def set_steric_number_and_lone_pairs(self, atom): atom.steric_number = 0 if atom.element not in self.valence_electrons: self.valence_electrons[atom.element] = 4 - _LOGGER.warning(f"Not found valence for element {atom.element}, use 4}") + _LOGGER.warning(f"Not found valence for \ + element {atom.element}, use 4") _LOGGER.debug('{0:>65s}: {1:>4d}'.format( 'Valence electrons', self.valence_electrons[atom.element])) atom.steric_number += self.valence_electrons[atom.element]