Skip to content

help on input fileΒ #198

@Nick-Mul

Description

@Nick-Mul

Hi Joe,
I was wondering if I could get some pointers on input file? Tutorial files work fine but could get 1AKI from openmm tutorials to work.

I am using openmm/pdbfixer for the ligand prep. (version 8.2.0 and 1.11)

from openmm.app import *
from openmm import *
from openmm.unit import *
from sys import stdout
from openmm.app import PDBFile
from pdbfixer import PDBFixer

fixer = PDBFixer(filename='1AKI_clean.pdb')
fixer.findMissingResidues()
fixer.findNonstandardResidues()
fixer.replaceNonstandardResidues()
fixer.removeHeterogens(True)
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(7.0)
fixer.addSolvent(Vec3(5, 5, 5)*nanometer, positiveIon='Na+', ionicStrength=0.1*molar)
PDBFile.writeFile(fixer.topology, fixer.positions, open('output.pdb', 'w'))
pdb = PDBFile("output.pdb")

However I get this error

ERROR: LoadError: KeyError: key "H2" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:477 [inlined]
 [2] System(coord_file::String, force_field::MolecularForceField{Float64, Quantity{Float64, 𝐌 𝐍⁻¹, Unitful.FreeUnits{(g, mol⁻¹), 𝐌 𝐍⁻¹, nothing}}, Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}, Quantity{Float64, 𝐋² 𝐌 𝐍⁻¹ 𝐓⁻², Unitful.FreeUnits{(kJ, mol⁻¹), 𝐋² 𝐌 𝐍⁻¹ 𝐓⁻², nothing}}, Quantity{Float64, 𝐌 𝐍⁻¹ 𝐓⁻², Unitful.FreeUnits{(kJ, nm⁻², mol⁻¹), 𝐌 𝐍⁻¹ 𝐓⁻², nothing}}}; boundary::Nothing, velocities::Nothing, loggers::Tuple{}, units::Bool, array_type::Type{Array}, dist_cutoff::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}, dist_neighbors::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}, center_coords::Bool, neighbor_finder_type::Nothing, data::Nothing, implicit_solvent::Nothing, kappa::Quantity{Float64, 𝐋⁻¹, Unitful.FreeUnits{(nm⁻¹,), 𝐋⁻¹, nothing}}, rename_terminal_res::Bool)
   @ Molly ~/.julia/packages/Molly/86RTP/src/setup.jl:574
 [3] top-level scope

when trying to use the "output.csv"

using Molly

data_dir = joinpath(dirname(pathof(Molly)), "..", "data")

ff = MolecularForceField(
    joinpath(data_dir, "force_fields", "ff99SBildn.xml"),
    joinpath(data_dir, "force_fields", "tip3p_standard.xml"),
    joinpath(data_dir, "force_fields", "his.xml"),
)

sys = System(
     "output.pdb",
    ff; rename_terminal_res=false
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions