Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-08 10:24:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-08 10:24:54 +0400
commit3e28b15f2aa2be1265977d14eb78122bae3e1096 (patch)
tree799ab47ee129e31cf5142ede413cc3187b6ee6a0 /io_mesh_pdb
parent04b24dbfe33c9dc657efc858de87c3b1e308f884 (diff)
minor edits
Diffstat (limited to 'io_mesh_pdb')
-rw-r--r--io_mesh_pdb/import_pdb.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/io_mesh_pdb/import_pdb.py b/io_mesh_pdb/import_pdb.py
index 8c4ab70c..6b39a78c 100644
--- a/io_mesh_pdb/import_pdb.py
+++ b/io_mesh_pdb/import_pdb.py
@@ -226,8 +226,6 @@ def load_pdb(context,
scene = context.scene
file = open(filepath, 'r')
- lines = file.readlines()
- file.close()
model_list = {}
model_flag = False
@@ -239,7 +237,7 @@ def load_pdb(context,
# -------------------------------------------------------------------------
# Parse data
- for line in lines:
+ for line in file:
# print(line)
if line[:6] == 'COMPND':
if line[11:17] == 'CHAIN:':
@@ -366,15 +364,18 @@ def load_pdb(context,
tempfactor, element,
charge)
+ file.close()
+
if (not multimers) or (not biomolecule_flag):
# Create a default biomolecule w/ all chains and identity transform
# Overwrites original biomolecule_list
biomolecule_flag = True
- biomolecule_list = {1: Biomolecule(1)}
- biomolecule_list[1].chain_transforms[tuple(chain_list)] = []
- biomolecule_list[1].chain_transforms[tuple(chain_list)].append([[1, 0, 0, 0],
- [0, 1, 0, 0],
- [0, 0, 1, 0]])
+ bm_serial = 1
+ biomolecule = Biomolecule(bm_serial)
+ biomolecule.chain_transforms[tuple(chain_list)] = [(((1.0, 0.0, 0.0, 0.0),
+ (0.0, 1.0, 0.0, 0.0),
+ (0.0, 0.0, 1.0, 0.0)))]
+ biomolecule_list = {bm_serial: biomolecule}
# -------------------------------------------------------------------------
# Create atom mesh template