Beispiel #1
0
props = ['id', 'pos', 'v', 'type', 'mass', 'q']
allParticles = []
for pid in range(num_particles):
    part = [
        pid + 1,
        Real3D(x[pid], y[pid], z[pid]),
        Real3D(vx[pid], vy[pid], vz[pid]), types[pid], masses[pid],
        charges[pid]
    ]
    allParticles.append(part)
system.storage.addParticles(allParticles, *props)
system.storage.decompose()

# set up LJ interaction according to the parameters read from the .top file
ljinteraction = gromacs.setLennardJonesInteractions(system, defaults,
                                                    atomtypeparameters,
                                                    verletlist, rc)

# set up angle interactions according to the parameters read from the .top file
angleinteractions = gromacs.setAngleInteractions(system, angletypes,
                                                 angletypeparams)

# set up coulomb interactions according to the parameters read from the .top file
# !! Warning: this only works for reaction-field now!
qq_interactions = gromacs.setCoulombInteractions(system,
                                                 verletlist,
                                                 rc,
                                                 types,
                                                 epsilon1=1,
                                                 epsilon2=80,
                                                 kappa=0)
Beispiel #2
0
print '# moving atomistic region composed of multiple spheres centered on each protein cg particle'
particlePIDsADR = [mapAtToCgIndex[pid] for pid in particlePIDsADR]
verletlist = espressopp.VerletListAdress(system,
                                         cutoff=nbCutoff,
                                         adrcut=nbCutoff,
                                         dEx=ex_size,
                                         dHy=hy_size,
                                         pids=particlePIDsADR,
                                         sphereAdr=True)

# set up LJ interaction according to the parameters read from the .top file
lj_adres_interaction = gromacs.setLennardJonesInteractions(system,
                                                           defaults,
                                                           atomtypeparameters,
                                                           verletlist,
                                                           intCutoff,
                                                           adress=True,
                                                           ftpl=ftpl)

# set up coulomb interactions according to the parameters read from the .top file
print '#Note: Reaction Field method is used for Coulomb interactions'
qq_adres_interaction = gromacs.setCoulombInteractions(system,
                                                      verletlist,
                                                      intCutoff,
                                                      atTypes,
                                                      epsilon1=1,
                                                      epsilon2=67.5998,
                                                      kappa=0,
                                                      adress=True,
                                                      ftpl=ftpl)
Beispiel #3
0
    # append tuple to tuplelist
    tuples.append(tmptuple)

system.storage.addParticles(allParticles, *props)

# create FixedTupleList object and add the tuples
ftpl = espressopp.FixedTupleListAdress(system.storage)
ftpl.addTuples(tuples)
system.storage.setFixedTuplesAdress(ftpl)
system.storage.decompose()

# set up LJ interaction according to the parameters read from the .top file
ljinteraction = gromacs.setLennardJonesInteractions(system,
                                                    defaults,
                                                    atomtypeparameters,
                                                    verletlist,
                                                    rca,
                                                    hadress=True,
                                                    ftpl=ftpl)

# set up angle interactions according to the parameters read from the .top file
angleinteractions = gromacs.setAngleInteractionsAdress(system, angletypes,
                                                       angletypeparams, ftpl)

# set up coulomb interactions according to the parameters read from the .top file
# !! Warning: this only works for reaction-field now!
qq_interactions = gromacs.setCoulombInteractions(system,
                                                 verletlist,
                                                 rca,
                                                 types,
                                                 epsilon1=1,