예제 #1
0
파일: water.py 프로젝트: govarguz/MESSPP
# 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)

# set up bonded interactions according to the parameters read from the .top file
bondedinteractions = gromacs.setBondedInteractions(system, bondtypes,
                                                   bondtypeparams)

# exlusions, i.e. pairs of atoms not considered for the non-bonded part. Those are defined either by bonds which automatically generate an exclusion. Or by the nregxcl variable
verletlist.exclude(exclusions)

# langevin thermostat
langevin = espressopp.integrator.LangevinThermostat(system)
langevin.gamma = 2.0
langevin.temperature = 2.4942  # kT in gromacs units
예제 #2
0
########################################################################

## adres interactions ##

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)

# set the CG potential for water. Set for LJ interaction, and QQ interaction has no CG equivalent, also prot has no CG potential, is always in adres region
# load CG interaction from table
fe="table_CGwat_CGwat.tab"
gromacs.convertTable("table_CGwat_CGwat.xvg", fe, 1, 1, 1, 1)
potCG = espressopp.interaction.Tabulated(itype=3, filename=fe, cutoff=intCutoff)
lj_adres_interaction.setPotentialCG(type1=typeCG, type2=typeCG, potential=potCG)

## bonded (fixed list) interactions for protein (actually between CG particles in AA region) ##

## set up LJ 1-4 interactions
cgOnefourpairslist=[]
for (a1,a2) in atOnefourpairslist:
  cgOnefourpairslist.append((mapAtToCgIndex[a1],mapAtToCgIndex[a2]))
print '# ',len(cgOnefourpairslist),' 1-4 pairs in aa-hybrid region'
예제 #3
0
                                                    hadress=True,
                                                    ftpl=ftpl)

# set up angle interactions according to the parameters read from the .top file
# COMMMENTED OUT BECAUSE OF SETTLE
#fpl = espressopp.FixedTripleListAdress(system.storage, ftpl)
#angleinteractions=gromacs.setAngleInteractions(system, angletypes, angletypeparams,fpl)

#fpl = espressopp.FixedTripleListAdress(system.storage, 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,
                                                 epsilon2=67.5998,
                                                 kappa=0,
                                                 hadress=True,
                                                 ftpl=ftpl)

# load CG interaction from table
#gromacs.convertTable("table_CG_CG.xvg", CG_tab, 1, 1, 1, 1)
#gromacs.convertTable("testtab.xvg", CG_tab, 1, 1, 1, 1)
potCG = espressopp.interaction.Tabulated(itype=3, filename=CG_tab,
                                         cutoff=rca)  # CG

# set the CG potential. There are two non-bonded interactions, we pick only the first one
for n in range(system.getNumberOfInteractions()):
    interaction = system.getInteraction(n)
    if interaction.bondType() == espressopp.interaction.Nonbonded:
예제 #4
0
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

#fpl = espressopp.FixedTripleListAdress(system.storage, ftpl)
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, epsilon2=80, kappa=0, hadress=True, ftpl=ftpl)

# load CG interaction from table
fe="table_CG_CG.tab"
gromacs.convertTable("table_CG_CG.xvg", fe, 1, 1, 1, 1)
potCG = espressopp.interaction.Tabulated(itype=3, filename=fe, cutoff=rca) # CG


# set the CG potential. There are two non-bonded interactions, we pick only the first one 
for n in range(system.getNumberOfInteractions()):
    interaction=system.getInteraction(n)
    if interaction.bondType() == espressopp.interaction.Nonbonded:
	print "Setting CG interaction", typeCG
	interaction.setPotentialCG(type1=typeCG, type2=typeCG, potential=potCG)
	break
예제 #5
0
파일: water.py 프로젝트: niktre/espressopp
        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)

# set up bonded interactions according to the parameters read from the .top file
bondedinteractions = gromacs.setBondedInteractions(system, bondtypes, bondtypeparams)

# exlusions, i.e. pairs of atoms not considered for the non-bonded part. Those are defined either by bonds which automatically generate an exclusion. Or by the nregxcl variable
verletlist.exclude(exclusions)

# langevin thermostat
langevin = espressopp.integrator.LangevinThermostat(system)
langevin.gamma = 2.0
langevin.temperature = 2.4942  # kT in gromacs units
integrator = espressopp.integrator.VelocityVerlet(system)
integrator.addExtension(langevin)
integrator.dt = timestep