{"action":"created","issue":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/1742","repository_url":"https://api.github.com/repos/pandegroup/openmm","labels_url":"https://api.github.com/repos/pandegroup/openmm/issues/1742/labels{/name}","comments_url":"https://api.github.com/repos/pandegroup/openmm/issues/1742/comments","events_url":"https://api.github.com/repos/pandegroup/openmm/issues/1742/events","html_url":"https://github.com/pandegroup/openmm/issues/1742","id":208058093,"number":1742,"title":"OpenMM 7.0 crashes with large system (500k atoms)","user":{"login":"JoaoRodrigues","id":237328,"avatar_url":"https://avatars.githubusercontent.com/u/237328?v=3","gravatar_id":"","url":"https://api.github.com/users/JoaoRodrigues","html_url":"https://github.com/JoaoRodrigues","followers_url":"https://api.github.com/users/JoaoRodrigues/followers","following_url":"https://api.github.com/users/JoaoRodrigues/following{/other_user}","gists_url":"https://api.github.com/users/JoaoRodrigues/gists{/gist_id}","starred_url":"https://api.github.com/users/JoaoRodrigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoaoRodrigues/subscriptions","organizations_url":"https://api.github.com/users/JoaoRodrigues/orgs","repos_url":"https://api.github.com/users/JoaoRodrigues/repos","events_url":"https://api.github.com/users/JoaoRodrigues/events{/privacy}","received_events_url":"https://api.github.com/users/JoaoRodrigues/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-02-16T08:54:39Z","updated_at":"2017-02-27T18:53:02Z","closed_at":null,"body":"Hi all,\r\n\r\nI'm trying to setup a simulation of a fairly large system (~500.000 atoms) using OpenMM 7.0, compiled against CUDA 8.0.4 and GCC 4.9.2. The script I'm using, which works fine for a small system (14.000 atoms), is [here](https://github.com/csblab/md_scripts/blob/master/openmm/minimize.py), fairly vanilla. It builds a rhombic dodecahedron box, solvates it, minimizes energy, and proceeds to do NVT equilibration.\r\n\r\nAdding hydrogens, solvent, etc, works well. Minimization gives problems however. It seems the minimizer cannot handle such a large system and so, as soon as NVT MD starts, the simulation crashes. Running this without position restraints doesn't make a difference. See my log below:\r\n\r\n```\r\n[2017/02/16 00:10:06] Using platform: CUDA\r\n[2017/02/16 00:10:06] Reading PDB file: model.pdb\r\n[2017/02/16 00:10:13] Adding missing atoms\r\n[2017/02/16 00:25:26] Moving system to origin\r\n[2017/02/16 00:25:31] Calculating optimal box size\r\n[2017/02/16 00:25:56] System      : 131218 Atoms   8452 Residues\r\n[2017/02/16 00:25:56] System Size : 17.227 17.026 16.138\r\n[2017/02/16 00:25:56] Diameter    : 18.673\r\n[2017/02/16 00:25:56] Box Volume  : 5891.645\r\n[2017/02/16 00:25:56] Box Vectors :\r\n[2017/02/16 00:25:56]   u = 20.273  0.000  0.000\r\n[2017/02/16 00:25:56]   v =  0.000 20.273  0.000\r\n[2017/02/16 00:25:56]   w = 10.136 10.136 14.335\r\n[2017/02/16 00:25:56] Solvating the system\r\n[2017/02/16 00:27:43]   num. waters: 140648\r\n[2017/02/16 00:27:43]   num. ions:    507 Na    383 Cl\r\n[2017/02/16 00:28:29] Adding pos. res. on non-hydrogen protein atoms\r\n[2017/02/16 00:28:32] 64606/554052 atoms restrained (Fc=  10.000 kJ/mol.nm^2)\r\n[2017/02/16 00:28:43] Initial Potential Energy: 1084443494602997235712.000\r\n[2017/02/16 00:28:57] Running energy minimization\r\n[2017/02/16 00:29:53] Potential Energy after minimization: 1070829797063901315072.000\r\n[2017/02/16 00:30:06] Releasing restraints on protein heavy atoms\r\n[2017/02/16 00:30:06] Equilibrating system at 300K for 0.5 ns\r\n#\"Step\"\t\"Potential Energy (kJ/mole)\"\t\"Kinetic Energy (kJ/mole)\"\t\"Total Energy (kJ/mole)\"\t\"Temperature (K)\"\t\"Speed (ns/day)\"\r\nTraceback (most recent call last):\r\n  File \"minimize.py\", line 240, in <module>\r\n    simulation.step(n_of_steps)\r\n  File \"/home/stanford/levittm/shared/software/miniconda2/lib/python2.7/site-packages/simtk/openmm/app/simulation.py\", line 132, in step\r\n    self._simulate(endStep=self.currentStep+steps)\r\n  File \"/home/stanford/levittm/shared/software/miniconda2/lib/python2.7/site-packages/simtk/openmm/app/simulation.py\", line 219, in _simulate\r\n    reporter.report(self, state)\r\n  File \"/home/stanford/levittm/shared/software/miniconda2/lib/python2.7/site-packages/simtk/openmm/app/statedatareporter.py\", line 195, in report\r\n    self._checkForErrors(simulation, state)\r\n  File \"/home/stanford/levittm/shared/software/miniconda2/lib/python2.7/site-packages/simtk/openmm/app/statedatareporter.py\", line 347, in _checkForErrors\r\n    raise ValueError('Energy is NaN')\r\nValueError: Energy is NaN\r\n```\r\n\r\nReading the issue tracker, it seems there is a [known problem with the TIP3P water model](https://github.com/pandegroup/openmm/issues/719#issuecomment-62794408) (issue #719). Is there any workaround you recommend? I can minimize the system in GROMACS (works well) and pass the optimized coordinates to OpenMM, but it sort of defeats the purpose of switching to OpenMM :) I could also switch to CHARMM and use their TIP3SP water model, which adds LJ terms to the hydrogens.\r\n\r\nThanks!\r\n\r\nJoão"},"comment":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/comments/282813438","html_url":"https://github.com/pandegroup/openmm/issues/1742#issuecomment-282813438","issue_url":"https://api.github.com/repos/pandegroup/openmm/issues/1742","id":282813438,"user":{"login":"peastman","id":4379786,"avatar_url":"https://avatars.githubusercontent.com/u/4379786?v=3","gravatar_id":"","url":"https://api.github.com/users/peastman","html_url":"https://github.com/peastman","followers_url":"https://api.github.com/users/peastman/followers","following_url":"https://api.github.com/users/peastman/following{/other_user}","gists_url":"https://api.github.com/users/peastman/gists{/gist_id}","starred_url":"https://api.github.com/users/peastman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peastman/subscriptions","organizations_url":"https://api.github.com/users/peastman/orgs","repos_url":"https://api.github.com/users/peastman/repos","events_url":"https://api.github.com/users/peastman/events{/privacy}","received_events_url":"https://api.github.com/users/peastman/received_events","type":"User","site_admin":false},"created_at":"2017-02-27T18:53:02Z","updated_at":"2017-02-27T18:53:02Z","body":"I just posted a PR with the fix.  The error happened when adding solvent to a system with a triclinic box, and when the initial (non-solvated) system spanned multiple boxes.  It would sometimes cause water to be put in places that produced severe clashes."}}
{"actor":{"display_login":"peastman"}}