Exemplo n.º 1
0
if (N_trans/N_rot % 1 != 0):
    raise CorrelationError("The number of translational beads must be a multiple of the number of rotaitonal beads")

#Strip output file extension and then replace it with _CM.xyz
CM_output_file = output_file[:(string.rfind(output_file, "."))] + "_CM.xyz"
CM_EA_zxz_output_file = output_file[:(string.rfind(output_file, "."))] + "_CM_EA_zxz.csv"
CM_EA_ZYZ_output_file = output_file[:(string.rfind(output_file, "."))] + "_CM_EA_ZYZ.csv"
CM_EA_ZYZ_xyz_output_file = output_file[:(string.rfind(output_file, "."))] + "_BEADS_CM_EA_ZYZ.xyz"
CM_EA_ZYZ_xyz_normal_output_file = output_file[:(string.rfind(output_file, "."))] + "_CM_EA_ZYZ.xyz"

###############################################################################
#Read in Cartesian coordinates
###############################################################################

out_dict = Clath_xyz.readWaterAtoms(input_file)

Oxy = out_dict["O"]
Hyd = out_dict["H"]

print "Atom positions read from file."

###############################################################################
#Determine the atom correlations for the water molecules
#For clathrates, all the H's are within 1A of the oxygen atom within 
#	the same water molecule, but further away from any other 
#	oxygen atom. Thus, this can be used to separate and sort out
#	which atoms belong in which molecule. The index number of the 
#	oxygen atom is taken as the index number of the molecule.
###############################################################################
Exemplo n.º 2
0
#Strip output file extension and then replace it with _CM.xyz
CM_output_file = output_file[:(string.rfind(output_file, "."))] + "_CM.xyz"
CM_EA_zxz_output_file = output_file[:(
    string.rfind(output_file, "."))] + "_CM_EA_zxz.csv"
CM_EA_ZYZ_output_file = output_file[:(
    string.rfind(output_file, "."))] + "_CM_EA_ZYZ.csv"
CM_EA_ZYZ_xyz_output_file = output_file[:(
    string.rfind(output_file, "."))] + "_BEADS_CM_EA_ZYZ.xyz"
CM_EA_ZYZ_xyz_normal_output_file = output_file[:(
    string.rfind(output_file, "."))] + "_CM_EA_ZYZ.xyz"

###############################################################################
#Read in Cartesian coordinates
###############################################################################

out_dict = Clath_xyz.readWaterAtoms(input_file)

Oxy = out_dict["O"]
Hyd = out_dict["H"]

print "Atom positions read from file."

###############################################################################
#Determine the atom correlations for the water molecules
#For clathrates, all the H's are within 1A of the oxygen atom within
#	the same water molecule, but further away from any other
#	oxygen atom. Thus, this can be used to separate and sort out
#	which atoms belong in which molecule. The index number of the
#	oxygen atom is taken as the index number of the molecule.
###############################################################################
Exemplo n.º 3
0
# According to Takeuchi, et al.:
#  Structure      Lattice Constant (A)
#    sII               17.31 (Takeuchi, et al.)
#    sI                12.03 (Takeuchi, et al. say that Ratcliffe and Ripmeester have this, but I didn't find it after a quick look)
latticeConst = {"sI": 12.03, "sII": 17.31}

xyz_atomFilename = sys.argv[1]
xyz_cageFilename = sys.argv[2]
cellStructure = sys.argv[3]
cellSize = latticeConst[cellStructure]
# cellSize = float(sys.argv[4])

###############################################################################
# Read in the O and H atom locations
###############################################################################
out_dict = Clath_xyz.readWaterAtoms(xyz_atomFilename)

Hyd = out_dict["H"]
Oxy = out_dict["O"]

print "Read in atom positions. There are %d H atoms and %s O atoms." % (len(Hyd), len(Oxy))


###############################################################################
# Read in the Cage Centre locations
###############################################################################
large_cages = []
small_cages = []

# Open input file
xyz_file = TextFile(xyz_cageFilename)
Exemplo n.º 4
0
# According to Takeuchi, et al.:
#  Structure      Lattice Constant (A)
#    sII               17.31 (Takeuchi, et al.)
#    sI                12.03 (Takeuchi, et al. say that Ratcliffe and Ripmeester have this, but I didn't find it after a quick look)
latticeConst = {"sI": 12.03, "sII": 17.31}

xyz_atomFilename = sys.argv[1]
xyz_cageFilename = sys.argv[2]
cellStructure = sys.argv[3]
cellSize = latticeConst[cellStructure]
#cellSize = float(sys.argv[4])

###############################################################################
#Read in the O and H atom locations
###############################################################################
out_dict = Clath_xyz.readWaterAtoms(xyz_atomFilename)

Hyd = out_dict["H"]
Oxy = out_dict["O"]

print "Read in atom positions. There are %d H atoms and %s O atoms." % (len(Hyd), len(Oxy))


###############################################################################
#Read in the Cage Centre locations
###############################################################################
large_cages = []
small_cages = []

#Open input file
xyz_file = TextFile(xyz_cageFilename)