Task: Do not add constraints involving extra particles (openmm/openmm#3506)

org: openmm
repo: openmm
pr_number: 3506
issue_title: Do not add constraints involving extra particles
issue_body: Fixes #3499.
resolved_issues: number: 3499
title: TIP4P waters not compatible with AllBonds?
body: Hi All,

I'm attempting to run a system with TIP4Pew waters using the "AllBond" constraint option, but I get the following error:
```
openmm.OpenMMException: A constraint cannot involve a massless particle
```
I'm assuming this is because of the virtual site on the water molecules.

Here is the script I'm using:
```
import simtk.openmm.app as app
import simtk.openmm as mm
import simtk.unit as unit
from sys import stdout

import numpy as np

prmtop = app.AmberPrmtopFile('tryp_ben.prmtop')
inpcrd = app.AmberInpcrdFile('tryp_ben.inpcrd')
system = prmtop.createSystem(nonbondedMethod=app.PME, nonbondedCutoff=1*unit.nanometer,
        constraints=app.AllBonds)

num_steps = 10000
time_step = 0.002

input_file = "tryp_ben_new.pdb"

mypdb = app.PDBFile(input_file)

integrator = mm.LangevinIntegrator(298.15*unit.kelvin, 1/unit.picosecond, time_step*unit.picoseconds)
platform = mm.Platform.getPlatformByName('CUDA')
properties = {'CudaDeviceIndex': '0', 'CudaPrecision': 'mixed'}
simulation = app.Simulation(prmtop.topology, system, integrator, platform, properties)
simulation.context.setPositions(mypdb.positions)
simulation.context.setPeriodicBoxVectors(*inpcrd.boxVectors)
simulation.minimizeEnergy()
simulation.context.setVelocitiesToTemperature(298.15 * unit.kelvin)
```

I've attached the files one can use to recreate this error.
[tryp_ben.prmtop.zip](https://github.com/openmm/openmm/files/8181237/tryp_ben.prmtop.zip)
[tryp_ben.inpcrd.zip](https://github.com/openmm/openmm/files/8181238/tryp_ben.inpcrd.zip)


## IMPORTANT INSTRUCTIONS

1. If you edit a python file, you MUST run 'make PythonInstall' inside the build directory
2. If you edit a c++ file, you MUST run 'make -j4 && make install" inside the build directory

Reference solution:
fix_patch: diff --git a/wrappers/python/openmm/app/internal/amber_file_parser.py b/wrappers/python/openmm/app/internal/amber_file_parser.py
index 26832fe589..e36152a962 100644
--- a/wrappers/python/openmm/app/internal/amber_file_parser.py
+++ b/wrappers/python/openmm/app/internal/amber_file_parser.py
@@ -768,15 +768,18 @@ def readAmberSystem(topology, prmtop_filename=None, prmtop_loader=None, shake=No
 
     # Add constraints.
     isWater = [prmtop.getResidueLabel(i) in ('WAT', 'HOH', 'TP4', 'TP5', 'T4E') for i in range(prmtop.getNumAtoms())]
+    isEP = [a.element is None for a in topology.atoms()]
     if shake in ('h-bonds', 'all-bonds', 'h-angles'):
         for (iAtom, jAtom, k, rMin) in prmtop.getBondsWithH():
-            system.addConstraint(iAtom, jAtom, rMin)
+            if not (isEP[iAtom] or isEP[jAtom]):
+                system.addConstraint(iAtom, jAtom, rMin)
     if shake in ('all-bonds', 'h-angles'):
         for (iAtom, jAtom, k, rMin) in prmtop.getBondsNoH():
-            system.addConstraint(iAtom, jAtom, rMin)
+            if not (isEP[iAtom] or isEP[jAtom]):
+                system.addConstraint(iAtom, jAtom, rMin)
     if rigidWater and shake is None:
         for (iAtom, jAtom, k, rMin) in prmtop.getBondsWithH():
-            if isWater[iAtom] and isWater[jAtom]:
+            if isWater[iAtom] and isWater[jAtom] and not (isEP[iAtom] or isEP[jAtom]):
                 system.addConstraint(iAtom, jAtom, rMin)
 
     # Add harmonic bonds.