fatmacankara commited on
Commit
6683d00
·
1 Parent(s): 983e197

Update code/add_3Dalignment.py

Browse files
Files changed (1) hide show
  1. code/add_3Dalignment.py +3 -1
code/add_3Dalignment.py CHANGED
@@ -223,9 +223,10 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
223
  if source == 'PDB':
224
  # Step 1: Fetch the PDB file
225
  pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
 
226
  response = requests.get(pdb_url)
227
  response.raise_for_status() # Check for a successful response
228
-
229
  # Step 2: Parse the PDB file from memory
230
  atoms = [i for i in response.text.split('\n') if i.startswith('ATOM')]
231
  atoms = [i.split() for i in atoms]
@@ -233,6 +234,7 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
233
  atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
234
  coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
235
  resnums_for_sasa = [i[5] for i in atoms]
 
236
  elif source == 'SWISSMODEL':
237
  atomSequence = ''
238
  coords = []
 
223
  if source == 'PDB':
224
  # Step 1: Fetch the PDB file
225
  pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
226
+ print(pdb_url)
227
  response = requests.get(pdb_url)
228
  response.raise_for_status() # Check for a successful response
229
+ print(response)
230
  # Step 2: Parse the PDB file from memory
231
  atoms = [i for i in response.text.split('\n') if i.startswith('ATOM')]
232
  atoms = [i.split() for i in atoms]
 
234
  atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
235
  coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
236
  resnums_for_sasa = [i[5] for i in atoms]
237
+ print(atoms)
238
  elif source == 'SWISSMODEL':
239
  atomSequence = ''
240
  coords = []