Ejemplo n.º 1
0
def calculateProperties(timestepData, atoms):

    properties = Properties()

    timestepData["molecule"] = {}
    timestepData["molecule"]["moleculeList"] = properties.findStructure(
        atoms, timestepData["position"], consts.cutoff)

    #init data lists in timestep data
    timestepData["molecule"]["RKE"] = []
    timestepData["molecule"]["KE"] = []
    timestepData["molecule"]["TKE"] = []
    timestepData["molecule"]["VelocityCOM"] = []
    timestepData["molecule"]["KECOM"] = []

    for molecule in timestepData["molecule"]["moleculeList"]:

        #    timestepData["molecule"]["RKE"].append(properties.RKE(molecule,atoms,timestepData["position"],timestepData["velocity"]))

        timestepData["molecule"]["TKE"].append(
            properties.TKE(molecule, atoms, timestepData["velocity"]))

        Vcom = properties.Vcom(molecule, atoms, timestepData["velocity"])

        timestepData["molecule"]["VelocityCOM"].append(Vcom)

        timestepData["molecule"]["KECOM"].append(
            properties.KEcom(molecule, atoms, Vcom))

    return timestepData