Skip to content

Commit fe2ce0b

Browse files
committed
changing filepath
1 parent d1e3817 commit fe2ce0b

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

chromo/mc/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ def _polymer_in_field(
109109
(default = None)
110110
"""
111111
np.random.seed(random_seed)
112+
print("output init "+ str(output_dir))
113+
#print(log_directory)
112114
if mc_move_controllers is None:
113115
mc_move_controllers = all_moves(
114116
log_dir=output_dir,
@@ -179,6 +181,7 @@ def _polymer_in_field(
179181
print("Save point " + str(mc_count) + " completed")
180182

181183
for polymer in polymers:
184+
print("update log path " + str(output_dir))
182185
polymer.update_log_path(
183186
str(output_dir) + "/" + polymer.name + "_config_log.csv"
184187
)
@@ -226,6 +229,7 @@ def continue_polymer_in_field_simulation(
226229
random_seed : Optional[SEED]
227230
Random seed for replication of simulation (default = 0)
228231
"""
232+
# issue is somewhere here
229233
latest_output_subdir = get_latest_simulation(output_dir)
230234
latest_output_subdir_path = output_dir + "/" + latest_output_subdir
231235
polymer_names = find_polymers_in_output_dir(latest_output_subdir_path)

chromo/polymers.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ cdef class PolymerBase(TransformedObject):
760760
"""
761761
if name is None:
762762
name = path.split("/")[-1].split(".")[0]
763+
print("name" + str(name))
763764
df = pd.read_csv(path, header=[0, 1], index_col=0)
764765
return cls.from_dataframe(df, name)
765766

chromo/run_simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
num_saves = num_snapshots,
128128
bead_amp_bounds = amp_bead_bounds,
129129
move_amp_bounds = amp_move_bounds,
130-
output_dir = '/scratch/users/ahirsch1/output', # for running on sherlock
131-
#output_dir = 'output',
130+
#output_dir = '/scratch/users/ahirsch1', # for running on sherlock
131+
output_dir = 'output',
132132
mc_move_controllers = moves_to_use,
133133
temperature_schedule = "no schedule",
134134
lt_schedule = "linear increase"

chromo/twist_schedule.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ def linear_increase(current_step, total_steps):
3131
return value
3232
def no_schedule():
3333
return 100
34+
#dynamic structure factor
35+
#density correlation function at differnet lengthscales
36+
#fouirer transform of density density correlation function
37+
#how much largest lengthscale of polymer is changing
38+
#correleation function of radius of gyration
39+
#how density fluctluation within polymer correlate in time
40+
#plot rmsd for different twist values

chromo/util/mc_stat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def create_log_file(self, ind: int):
100100
Index with which to append log file name
101101
"""
102102
log_path = self.log_dir+"/"+self.log_file_prefix+str(ind)+".csv"
103+
print("log dir in mc_stat "+str(self.log_dir))
104+
print("prefix in mcstat " + str(self.log_file_prefix))
103105
column_labels = [
104106
"snapshot",
105107
"iteration",
@@ -209,7 +211,7 @@ def update_acceptance_rate(self, accept: float, log_update: int):
209211

210212

211213
class ConfigurationTracker(Tracker):
212-
"""Track progressive reconfiguraion of the polymer.
214+
"""Track progressive reconfiguration of the polymer.
213215
"""
214216

215217
def __init__(self, log_path: str, initial_config: np.ndarray):
@@ -218,7 +220,7 @@ def __init__(self, log_path: str, initial_config: np.ndarray):
218220
Parameters
219221
----------
220222
log_path : str
221-
Path to the output file for confiruation tracker
223+
Path to the output file for configuration tracker
222224
initial_config : np.ndarray (N, 3)
223225
Initial polymer configuration; rows represent individual beads and
224226
columns represent (x, y, z) coordinates

chromo/view_past_simulation_output.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,16 @@
150150
#print(ratio)
151151

152152
def find_RMSD(array1, array2):
153-
153+
array1 = array1 - np.mean(array1, axis = 0)
154+
array2 = array2 - np.mean(array2, axis = 0)
154155
RMSD = np.sqrt(
155156
1 / array1.shape[0] * np.sum(
156157
np.linalg.norm(array2 - array1, ord=1, axis=1)
157158
)
158159
)
159160

160161
return RMSD
161-
162+
# dot produt of end to end vector should be a decaying function over different snapshots
162163
num_equilibration = 70
163164
RMSD_list = []
164165
x_list = []

0 commit comments

Comments
 (0)