Add a communicator class. For now it contains a rank function to get the MPI rank. Eventually it will contain most of the communication functions.
The raw MPI_Comm
value is stored internally to the class.
from __future__ import print_function, division | |
import simflat | |
import initatoms | |
import time | |
import constants | |
import argparse | |
from multiprocessing import Process, Queue | |
from Queue import Empty | |
import collections |
from __future__ import print_function, division | |
import simflat | |
import initatoms | |
import time | |
import constants | |
import argparse | |
import numba | |
# Translation of CoMD to Python |
from __future__ import print_function, division | |
import numpy as np | |
import math | |
import numba | |
def initLinkCells(sim, box_size): | |
gridSize = np.array([int(b/sim.pot.cutoff) for b in box_size], dtype=np.int) | |
boxSize = box_size*1.0/gridSize |
import pyximport; pyximport.install() | |
import simflat | |
import initatoms | |
import time | |
import constants | |
import argparse | |
# Translation of CoMD to Python |
include("initAtoms.jl") | |
include("simflat.jl") | |
include("ljforce.jl") | |
using ArgParse | |
# Translation of CoMD to Julia | |
function initValidate(sim) |
include("constants.jl") | |
type LJ_Pot | |
sigma::Float | |
epsilon::Float | |
mass::Float | |
lat::Float | |
lattice_type::String | |
cutoff::Float | |
name::String |
import constants | |
import numba | |
class LJ_Pot(object): | |
def __init__(self): | |
self.sigma = 2.315 | |
self.epsilon = 0.167 | |
self.mass = 63.55 * constants.amuToInternalMass | |
self.lat = 3.615 | |
self.lattice_type = 'FCC' |
import constants | |
import cython | |
cimport numpy as np | |
class LJ_Pot(object): | |
def __init__(self): | |
self.sigma = 2.315 | |
self.epsilon = 0.167 | |
self.mass = 63.55 * constants.amuToInternalMass |
# Compute force on a particle with a pair potential | |
# Uses Lennard-Jones potential | |
import sympy | |
# Assigment looks like a relational operator, but probably shouldn't be | |
from sympy.core.relational import Assignment | |
import sympy.printing |