Skip to content

Commit

Permalink
Merge pull request #4 from CurtisColwell/nix_jup
Browse files Browse the repository at this point in the history
Nix jup
  • Loading branch information
CurtisColwell authored Mar 25, 2019
2 parents b456310 + 82ef51d commit c56e7f7
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 132 deletions.
125 changes: 0 additions & 125 deletions Finished Strain Modeler.ipynb

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ geometry/ directory.
that will allow the molecule to release its strain and saving them as .xyz
files in the dummies/ directory.

5. Run the dummy_input.py script to create input files that will optimize
5. Run the proton_opt.py script to create input files that will optimize
the proton added to the dummy molecules using Gaussian.

6. Once the proton has been optimized, use Gaussian to calculate molecular
Expand Down
2 changes: 1 addition & 1 deletion atom_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def vmd_vector_writer(script_name, vector_colors, geometry_filename, min, max):
script = open('output/' + script_name, "w")
script.write("# Minimum: %s\r# Maximum: %s\r\r" % (min,max))
script.write("# Load a molecule\rmol new %s\r\r" % (geometry_filename))
with open("vmd_vector_header.tcl") as script_header:
with open("headers/vmd_vector_header.tcl") as script_header:
for line in script_header:
script.write(line)
script.write("\r")
Expand Down
10 changes: 5 additions & 5 deletions bond_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def map_forces(geometry, force_output):
angle_forces_vmd, angle_min, angle_max = vmd_norm(compressed_angle_forces)
dihedral_forces_vmd, dihedral_min, dihedral_max = vmd_norm(compressed_dihedral_forces)

vmd_writer("vmd_bond_script_" + os.path.splitext(force_output)[0] + ".tcl", bond_forces_vmd, geometry, bond_min, bond_max, "vmd_bond_header.tcl")
vmd_writer("vmd_angle_script_" + os.path.splitext(force_output)[0] + ".tcl", angle_forces_vmd, geometry, angle_min, angle_max, "vmd_angle_and_dihedral_header.tcl")
vmd_writer("vmd_dihedral_script_" + os.path.splitext(force_output)[0] + ".tcl", dihedral_forces_vmd, geometry, dihedral_min, dihedral_max, "vmd_angle_and_dihedral_header.tcl")
vmd_writer("vmd_bond_script_" + os.path.splitext(force_output)[0] + ".tcl", bond_forces_vmd, geometry, bond_min, bond_max, "headers/vmd_bond_header.tcl")
vmd_writer("vmd_angle_script_" + os.path.splitext(force_output)[0] + ".tcl", angle_forces_vmd, geometry, angle_min, angle_max, "headers/vmd_angle_and_dihedral_header.tcl")
vmd_writer("vmd_dihedral_script_" + os.path.splitext(force_output)[0] + ".tcl", dihedral_forces_vmd, geometry, dihedral_min, dihedral_max, "headers/vmd_angle_and_dihedral_header.tcl")

return copy_bond_forces, copy_angle_forces, copy_dihedral_forces;

Expand Down Expand Up @@ -230,6 +230,6 @@ def combine_dummies(forces, geometry, force_type):
#Write the forces to a .tcl script
new_forces_vmd, scale_min, scale_max = vmd_norm(new_forces)
if force_type == "bond":
vmd_writer("vmd_" + force_type + "_script_total.tcl", new_forces_vmd, geometry, scale_min, scale_max, "vmd_bond_header.tcl")
vmd_writer("vmd_" + force_type + "_script_total.tcl", new_forces_vmd, geometry, scale_min, scale_max, "headers/vmd_bond_header.tcl")
else:
vmd_writer("vmd_" + force_type + "_script_total.tcl", new_forces_vmd, geometry, scale_min, scale_max, "vmd_angle_and_dihedral_header.tcl")
vmd_writer("vmd_" + force_type + "_script_total.tcl", new_forces_vmd, geometry, scale_min, scale_max, "headers/vmd_angle_and_dihedral_header.tcl")
4 changes: 4 additions & 0 deletions dummies/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
4 changes: 4 additions & 0 deletions geometry/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions output/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
14 changes: 14 additions & 0 deletions proton_opt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
from scripts import *

for file in os.listdir('geometry'):
if file.endswith(".xyz"):
geometry_filename = 'geometry/' + file

dummies = []
for file in os.listdir('dummies'):
if file.endswith(".xyz"):
dummies.append('dummies/' + file)

for file in dummies:
create_protonopts(geometry_filename, file)

0 comments on commit c56e7f7

Please sign in to comment.