Skip to content

Commit

Permalink
unique features
Browse files Browse the repository at this point in the history
  • Loading branch information
axsk committed May 12, 2024
1 parent 7be59dd commit da2e4ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions scripts/villin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ using PyCall

## Config

comment = "momenta"
comment = "momenta-long-lowfriction"

pdb = "data/villin nowater.pdb"
steps = 10_000
steps = 30_000
step = 0.002
temp = 310
friction = 1
friction = 0.01
integrator = :langevinmiddle
momenta = true
features = 0.5 # 0 => backbone only
Expand Down Expand Up @@ -53,14 +53,9 @@ println("lagtime: $lagtime ns")
println("simtime per generation: $simtime_per_gen ns")

@time "creating system" sim = OpenMMSimulation(;
pdb, steps, forcefields, features, friction, step, momenta, temp, nthreads=1, mmthreads="gpu")

if addwater
@time "adding water" sim = OpenMMSimulation(;
pdb, steps, forcefields, friction, step, momenta, temp, nthreads=1, mmthreads="gpu",
features=sim.features, addwater=true, padding, ionicstrength)
end
pdb, steps, forcefields, features, friction, step, momenta, temp, nthreads=1, mmthreads="gpu", addwater, padding, ionicstrength)

#=
@pyimport openmm
picosecond = openmm.unit.picosecond
kelvin = openmm.unit.kelvin
Expand All @@ -74,6 +69,7 @@ elseif integrator == :varverlet
elseif integrator == :nosehoover
sim.pysim.context._integrator = openmm.NoseHooverIntegrator(sim.temp * kelvin, sim.friction / picosecond, sim.step * picosecond)
end
=#

data = if readdata isa String
@time "reading initial data" let i = ISOKANN.load(readdata)
Expand Down
2 changes: 1 addition & 1 deletion src/simulators/openmm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function OpenMMSimulation(;
pysim = @pycall py"defaultsystem"(pdb, ligand, forcefields, temp, friction, step, minimize; addwater, padding, ionicstrength, forcefield_kwargs)::PyObject
if features isa Number
radius = features
features = [calpha_pairs(pysim); local_atom_pairs(pysim, radius)]
features = [calpha_pairs(pysim); local_atom_pairs(pysim, radius)] |> unique
end
return OpenMMSimulation(pysim::PyObject, pdb, ligand, forcefields, temp, friction, step, steps, features, nthreads, mmthreads, momenta)
end
Expand Down

0 comments on commit da2e4ef

Please sign in to comment.