Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in the beta-2-adrenergic receptor tutorial #3114

Open
DanielWicz opened this issue May 13, 2021 · 3 comments
Open

Typo in the beta-2-adrenergic receptor tutorial #3114

DanielWicz opened this issue May 13, 2021 · 3 comments
Assignees
Labels
bug documentation low effort low priority tutorial Relating to existing tutorials or candidates for tutorials

Comments

@DanielWicz
Copy link

DanielWicz commented May 13, 2021

In the tutorial here: http://openmm.org/tutorials/b2ar_membrane/
I think in the line

params = CharmmPsfFile('par_all36_prot.rtf', 'top_all36_prot.prm',
                       'par_all36_lipid.rtf', 'top_all36_lipid.prm',
                       'toppar_water_ion.str')

it should be

params = CharmmParameterSet('par_all36_prot.rtf', 'top_all36_prot.prm',
                            'par_all36_lipid.rtf', 'top_all36_lipid.prm',
                            'toppar_water_ion.str')
@DanielWicz
Copy link
Author

DanielWicz commented May 13, 2021

Plus there's more errors. Topology files are named like parameter files and vice-versa. Is there this tutorial on the GitHub repo ?

@apayne97
Copy link

apayne97 commented Jun 8, 2021

I just did this for my own membrane protein, and I'll just show what I had here:

(i used the charmm36m forcefield, which changed the name of the par_all36_prot.prm file)
param_file_names = [
'top_all36_prot.rtf',
'par_all36m_prot.prm',
'top_all36_lipid.rtf',
'par_all36_lipid.prm',
'toppar_water_ions.str',
]

You're not alone! thankfully easily discovered by comparing the file names but an unnecessary typo nonetheless.

@apayne97
Copy link

for future reference I'll include the code represented in the tutorial here:

from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
from sys import stdout, exit, stderr

# Load CHARMM files
psf = CharmmPsfFile('step5_charmm2omm.psf')
pdb = PDBFile('step5_charmm2omm.pdb')
params = CharmmPsfFile('par_all36_prot.rtf', 'top_all36_prot.prm',
                       'par_all36_lipid.rtf', 'top_all36_lipid.prm',
                       'toppar_water_ion.str')

# Create an openmm system by calling createSystem on psf
system = psf.createSystem(params, nonbondedMethod=NoCutoff,
         nonbondedCutoff=1*nanometer, constraints=HBonds)
integrator = LangevinIntegrator(300*kelvin,   # Temperature of head bath
                                1/picosecond, # Friction coefficient
                                0.002*picoseconds) # Time step

simulation = Simulation(psf.topology, system, integrator)
simulation.context.setPositions(pdb.positions)
simulation.minimizeEnergy()

# Set up the reporters to report energies every 1000 steps.
simulaiton.reporters.append(PDBReporter('output.pdb', 1000))
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
                            potentialEnergy=True, temperature=True))
# run simulation
simulation.step(10000)

Another typo: simulaiton.reporters.append(PDBReporter('output.pdb', 1000)) should be simulation.reporters.append(PDBReporter('output.pdb', 1000))

And probably more importantly, this current tutorial results in a system without unit cell dimensions, so periodic methods like PME cannot be used. The 'NoCutoff' nonbondedMethod is not ideal and there are some better tools now to use. In light of all of this, and with @jchodera's suggestion, I've made a new issue #3152 to work on an updated guide / tutorial for simulating systems set up in CHARMM-GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation low effort low priority tutorial Relating to existing tutorials or candidates for tutorials
Projects
None yet
Development

No branches or pull requests

5 participants