boscoh / pdbremix

analyse PDB files, run molecular-dynamics & analyse trajectories
MIT License
61 stars 25 forks source link

pdbasa throws NameError #1

Closed morizono closed 10 years ago

morizono commented 10 years ago

If I don't invoke the outfile.pdb, it exits normally after the surface area calculation But am getting the following traceback -- where does mol come from?

$ pdbasa -n 50 FROG_center.pdb ASA.pdb Points on sphere: 50 14256.4 angstrom squared. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pdbasa", line 5, in pkg_resources.run_script('pdbremix==.', 'pdbasa') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 507, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 1272, in run_script execfile(script_filename, namespace, namespace) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdbremix-.-py2.7.egg/EGG-INFO/scripts/pdbasa", line 40, in mol.write_pdb(arg['']) NameError: name 'mol' is not defined

morizono commented 10 years ago

Just wanted to get asa for each atom. Changing the end to

asas = calculate_asa(atoms, 1.4, n_sphere) print "%.1f angstrom squared." % sum(asas)

for asa, atom in zip(asas, atoms): print asa

Gives output of a long column that can be pasted into a PDB file

boscoh commented 10 years ago

definitely a bug. i must have missed this when i did the big library cleanup a while back. fix updated on main git branch.

morizono commented 10 years ago

Thanks!

On Aug 30, 2014, at 8:30 PM, Bosco Ho notifications@github.com wrote:

definitely a bug. i must have missed this when i did the big library cleanup a while back. fix updated on main git branch.

\ Reply to this email directly or view it on GitHub.