Comments (9)
What you described sounds correct. You need to add the correct bonds to your Topology. Then use a ForceField to create a System from it, and call setUsesPeriodicBoundaryConditions(True)
on each of the bonded forces in the System.
from openmm.
What you described sounds correct. You need to add the correct bonds to your Topology. Then use a ForceField to create a System from it, and call
setUsesPeriodicBoundaryConditions(True)
on each of the bonded forces in the System.
thanks a lot. I initialize my topology from gromacs topology file. If I bond two atoms, how does the system know the real bond atoms? If the distance is small enough, bond the atoms in the same box. Otherwise, bond the atom with the mirror box?
I tried to list the force of the system by system.getForces()
and modify them to setUsesPeriodicBoundaryConditions(True)
. But it didn't work.
from openmm.
How do you create your System? Do you call createSystem()
on a GromacsTopFile or a ForceField?
If you create it directly from the Gromacs file, that file needs to describe an infinite molecule with the ends bonded to each other. Modifying the Topology won't affect the System. You'll still get whatever the Gromacs file describes.
I tried to list the force of the system by system.getForces() and modify them to setUsesPeriodicBoundaryConditions(True). But it didn't work.
Please be more specific. What exactly did you do, and what exactly happened? Show your code.
from openmm.
How do you create your System? Do you call
createSystem()
on a GromacsTopFile or a ForceField?If you create it directly from the Gromacs file, that file needs to describe an infinite molecule with the ends bonded to each other. Modifying the Topology won't affect the System. You'll still get whatever the Gromacs file describes.
I tried to list the force of the system by system.getForces() and modify them to setUsesPeriodicBoundaryConditions(True). But it didn't work.
Please be more specific. What exactly did you do, and what exactly happened? Show your code.
I want to simulate an infinite long DNA chain in the periodic box. The topology file has defined the bonds between the bottom atoms and top atoms. Bond(<Atom 317 (O3') of chain 0 residue 9 (DC)>, <Atom 0 (P) of chain 0 residue 0 (DG)>)
from openmm.
You didn't answer the questions. See my post above.
from openmm.
You didn't answer the questions. See my post above.
from openmm.app import *
from openmm import *
from openmm.unit import *
from sys import stdout
from parmed.openmm import load_topology
forcefield = ForceField( 'amber14/tip3pfb.xml',"amber14/DNA.OL15.xml")
pdb = PDBFile('2dna.pdb')
gmx_top_2 = GromacsTopFile('topol.top')
print(type(gmx_top_2.topology))
modeller = Modeller(gmx_top_2.topology, pdb.positions)
modeller.addSolvent(forcefield, model='tip3p', ionicStrength=0.15 * molar,boxSize=Vec3(8, 8, 3.375)*nanometers)
system = forcefield.createSystem(modeller.topology, nonbondedMethod=PME, nonbondedCutoff=1.0*nanometer, constraints=HBonds)
integrator = LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds)
simulation = Simulation(modeller.topology, system, integrator)
simulation.context.setPositions(modeller.positions)
from openmm.
You didn't answer the questions. See my post above.
Refer to the code provided above. If the simulation is executed in that manner, the bond Bond(<Atom 317 (O3') of chain 0 residue 9 (DC)>, <Atom 0 (P) of chain 0 residue 0 (DG)>)
will link the two atoms within the same box. I hope that the bond can automatically connect the nearest atoms within the periodic boxes.
from openmm.
Immediately after creating the System (and before creating the Simulation), you need to call setUsesPeriodicBoundaryConditions(True)
on each of the bonded forces in it. Otherwise the bond will connect atoms within the same periodic copy.
from openmm.
Immediately after creating the System (and before creating the Simulation), you need to call
setUsesPeriodicBoundaryConditions(True)
on each of the bonded forces in it. Otherwise the bond will connect atoms within the same periodic copy.
Thanks a lot. I made a mistake in that I set setUsesPeriodicBoundaryConditions(True)
before the simulation.
from openmm.
Related Issues (20)
- Periodic boundary conditions with DrudeForce HOT 4
- Charge flux in openmm HOT 3
- modeller.addSolvent error with residue templates and non-standard residues HOT 3
- Protein PDB File Loading Problem (ValueError: No template found for residue) HOT 1
- Massless atoms destroying/altering motion of system HOT 3
- TypeError in custom integrator despite correct type HOT 8
- No template found issue for C-terminal residues HOT 6
- Overflow in force calculation HOT 2
- problem [ virtural_site3 ] from GROMACS files HOT 7
- NaN forces with CustomCentroidBondForce as collective variable in CustomCVForce HOT 2
- Python wrapper: install in `CMAKE_INSTALL_PREFIX` HOT 6
- Martini simulation with no output HOT 6
- OpenMMException: Particle coordinate is nan when multiple GPUs are used HOT 6
- OpenMM 8.1.1 on Summit failing CUDA specific make tests HOT 4
- Which charmm36 forcefield version is loaded by default? HOT 3
- Interaction energy HOT 3
- big energy expression leads to wrong energies with GPU HOT 1
- Numerical problem causing NaN in energy calculation of CustomNonbondedForce HOT 1
- Pair-Energy Reporter in OpenMM HOT 1
- Modelling System with Peptide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openmm.