Skip to content
Snippets Groups Projects
Commit 845b516c authored by cmaffeo2's avatar cmaffeo2
Browse files

Moved null.dx into 'potentials' directory

parent 00443f9d
No related branches found
No related tags found
No related merge requests found
...@@ -733,7 +733,7 @@ class ArbdModel(PdbModel): ...@@ -733,7 +733,7 @@ class ArbdModel(PdbModel):
def writeArbdFiles(self, prefix, numSteps=100000000, outputPeriod=10000): def writeArbdFiles(self, prefix, numSteps=100000000, outputPeriod=10000):
## TODO: save and reference directories and prefixes using member data ## TODO: save and reference directories and prefixes using member data
d = "potentials" d = self.potential_directory = "potentials"
if not os.path.exists(d): if not os.path.exists(d):
os.makedirs(d) os.makedirs(d)
self._bond_filename = "%s/%s.bonds.txt" % (d, prefix) self._bond_filename = "%s/%s.bonds.txt" % (d, prefix)
...@@ -834,7 +834,7 @@ diffusion {diffusivity} ...@@ -834,7 +834,7 @@ diffusion {diffusivity}
fh.write("gridFileScale {}\n".format(gridFileScale)) fh.write("gridFileScale {}\n".format(gridFileScale))
else: else:
fh.write("gridFile null.dx\n") fh.write("gridFile {}/null.dx\n".format(self.potential_directory))
## Write coordinates and interactions ## Write coordinates and interactions
fh.write(""" fh.write("""
...@@ -876,7 +876,8 @@ tabulatedPotential 1 ...@@ -876,7 +876,8 @@ tabulatedPotential 1
write_null_dx = False write_null_dx = False
for pt,num in self.getParticleTypesAndCounts(): for pt,num in self.getParticleTypesAndCounts():
if "grid" not in pt.__dict__: if "grid" not in pt.__dict__:
with open("null.dx",'w') as fh: gridfile = "{}/null.dx".format(self.potential_directory)
with open(gridfile, 'w') as fh:
fh.write("""object 1 class gridpositions counts 2 2 2 fh.write("""object 1 class gridpositions counts 2 2 2
origin {originX} {originY} {originZ} origin {originX} {originY} {originZ}
delta {dimX} 0.000000 0.000000 delta {dimX} 0.000000 0.000000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment