Skip to content

Commit

Permalink
fix type error in charge writing
Browse files Browse the repository at this point in the history
  • Loading branch information
a-r-j authored Oct 28, 2023
1 parent 62252b3 commit 4174aec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphein/protein/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from urllib.request import urlopen

import networkx as nx
import numpy as np
import pandas as pd
import numpy as np
import requests
import wget
from biopandas.pdb import PandasPdb
Expand Down Expand Up @@ -404,7 +404,7 @@ def save_graph_to_pdb(
df = g.graph["pdb_df"]
# format charge correctly
df.charge = df.charge.replace("", np.nan)
df["charge"] = df.charge.apply(lambda x: float(x) if x != "" else "")
df.charge = df.charge.astype(float)

# Add blank columns
blank_cols = [
Expand Down

0 comments on commit 4174aec

Please sign in to comment.