Skip to content

Commit

Permalink
temp files in packing
Browse files Browse the repository at this point in the history
  • Loading branch information
ctk3b committed Apr 22, 2015
1 parent 1d75364 commit 9bbbb88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions mbuild/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ def fill_box(compound, n_compounds, box, overlap=0.2):

compound_pdb = tempfile.mkstemp(suffix='.pdb')[1]
compound.save(compound_pdb)
#filled_pdb = tempfile.mkstemp(suffix='.pdb')[1]
filled_pdb = 'filled.pdb'
filled_pdb = tempfile.mkstemp(suffix='.pdb')[1]

# In angstroms for packmol.
box_lengths = box.lengths * 10
Expand Down Expand Up @@ -105,8 +104,7 @@ def solvate(solute, solvent, n_solvent, box, overlap=0.2):
solute.save(solute_pdb)
solvent_pdb = tempfile.mkstemp(suffix='.pdb')[1]
solvent.save(solvent_pdb)
#solvated_pdb = tempfile.mkstemp(suffix='.pdb')[1]
solvated_pdb = 'solvated.pdb'
solvated_pdb = tempfile.mkstemp(suffix='.pdb')[1]

# In angstroms for packmol.
box_lengths = box.lengths * 10
Expand All @@ -131,6 +129,7 @@ def solvate(solute, solvent, n_solvent, box, overlap=0.2):
solvated.update_coordinates(solvated_pdb)
return solvated


def _packmol_error(out, err):
with open('log.txt', 'w') as log_file, open('err.txt', 'w') as err_file:
log_file.write(out)
Expand Down
1 change: 0 additions & 1 deletion mbuild/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__author__ = 'CTK'

0 comments on commit 9bbbb88

Please sign in to comment.