Search found 8 matches

by JZ Most
Fri Jun 28, 2024 8:15 pm
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Sorry about being confusing, please see below, Initialize the positions import numpy as np from simtk import openmm as mm from simtk.openmm import app from simtk.unit import nanometer, picosecond, angstrom, kilojoule_per_mole, kelvin, kilocalorie_per_mole import openmm.unit as unit import time from ...
by JZ Most
Fri Jun 28, 2024 9:01 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Thanks for replying. The physical system I tried to simulate is 'a cubic system (L = 1e-8m), with 2 layer of fixed charges at x = 0 and x = L/2, and certain number of free ions '. There are two approaches I implemented, one is to use openmm to calculate the PME coulombic and LJ forces and use python...
by JZ Most
Fri Jun 28, 2024 3:44 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Thanks for replying. The values of positions are from 0 to 1e-8m, I transfered them to the unit of angstrom. Thats why I multiple them with 1e+10
by JZ Most
Thu Jun 27, 2024 6:09 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Hi Peter, How are you, I have now looked back on this problem. And recently I found some problems about the computation. box_size = 100*angstrom # define a new system system = mm.System() system.setDefaultPeriodicBoxVectors((box_size, 0, 0), (0, box_size, 0), (0, 0, box_size)) # define the ion numbe...
by JZ Most
Mon Oct 02, 2023 6:16 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Hi Peter, Thanks for your replying, now the code can run very fastly. However, the results did not match with my PDE simulation, I am not sure which part was wrong. So I am trying to implement all the Brownian dynamic simulation (including LJ force and random diffusion) via Openmm. My problem settin...
by JZ Most
Thu Sep 21, 2023 11:48 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

My system size is 1000 angstrom actually, which is equivalent to 100 nm. My code can be changed to that size but no difference showed. I changed my code alittle bit, and it can run very fastly, only <0.1s, but I am not sure it make sense or not. I changed the size to 100A, cutoff to 10A, tolerance t...
by JZ Most
Thu Sep 21, 2023 10:06 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Re: Python API to evaluate ewald Coulomb force

Hi Peter, Thanks for replying. I am timing the whole script but certainly the simulation.context.getState(getForces=True) is the only time consuming line. I use a normal PC to run this code, of which cost 2.5 second to complete a Pymatgen ewald evaluation. Openmm is written in C++, it should be much...
by JZ Most
Thu Sep 21, 2023 6:17 am
Forum: OpenMM
Topic: Python API to evaluate ewald Coulomb force
Replies: 14
Views: 1176

Python API to evaluate ewald Coulomb force

Hi guys, I am a new user of OpenMM, I am trying to use the OpenMM via the python API to evaluate the long range coulomb force by PME or ewald summation. Below is my code, I am evaluating a system of 60 Na and 50 Cl. However I found this code is even much slower than Pymatgen (written in Python). Ma...