|
5 | 5 |
|
6 | 6 | import cbit.vcell.geometry.AnalyticSubVolume; |
7 | 7 | import cbit.vcell.geometry.SubVolume; |
| 8 | +import cbit.vcell.math.*; |
8 | 9 | import cbit.vcell.model.Structure; |
9 | 10 | import cbit.vcell.solver.*; |
10 | 11 | import org.vcell.util.Pair; |
|
18 | 19 | import cbit.vcell.mapping.SimulationContext; |
19 | 20 | import cbit.vcell.mapping.SpeciesContextSpec; |
20 | 21 | import cbit.vcell.mapping.SimulationContext.Application; |
21 | | -import cbit.vcell.math.Action; |
22 | | -import cbit.vcell.math.JumpProcessRateDefinition; |
23 | | -import cbit.vcell.math.LangevinParticleJumpProcess; |
24 | | -import cbit.vcell.math.LangevinParticleMolecularComponent; |
25 | | -import cbit.vcell.math.LangevinParticleMolecularType; |
26 | | -import cbit.vcell.math.MacroscopicRateConstant; |
27 | | -import cbit.vcell.math.MathDescription; |
28 | | -import cbit.vcell.math.MathException; |
29 | | -import cbit.vcell.math.MathUtilities; |
30 | | -import cbit.vcell.math.ParticleComponentStateDefinition; |
31 | | -import cbit.vcell.math.ParticleComponentStatePattern; |
32 | | -import cbit.vcell.math.ParticleJumpProcess; |
33 | | -import cbit.vcell.math.ParticleMolecularComponent; |
34 | | -import cbit.vcell.math.ParticleMolecularComponentPattern; |
35 | | -import cbit.vcell.math.ParticleMolecularType; |
36 | | -import cbit.vcell.math.ParticleMolecularTypePattern; |
37 | | -import cbit.vcell.math.ParticleProperties; |
38 | 22 | import cbit.vcell.math.ParticleProperties.ParticleInitialCondition; |
39 | 23 | import cbit.vcell.math.ParticleProperties.ParticleInitialConditionCount; |
40 | | -import cbit.vcell.math.ParticleSpeciesPattern; |
41 | | -import cbit.vcell.math.SubDomain; |
42 | | -import cbit.vcell.math.Variable; |
43 | 24 | import cbit.vcell.mathmodel.MathModel; |
44 | 25 | import cbit.vcell.messaging.server.SimulationTask; |
45 | 26 | import cbit.vcell.parser.DivideByZeroException; |
@@ -910,7 +891,21 @@ private static void writeSpeciesInfo(StringBuilder sb) { |
910 | 891 | throw new RuntimeException("Initial concentration must be a number"); |
911 | 892 | } |
912 | 893 |
|
913 | | - sb.append("MOLECULE: \"" + lpmt.getName() + "\" " + subDomain.getName() + |
| 894 | + String locationName; |
| 895 | + if(subDomain instanceof MembraneSubDomain) { |
| 896 | + // we can't use the "Extracellular_Intracellular_membrane" math name of the subdomain, |
| 897 | + // the Langevin solver has no clue about what that might be |
| 898 | + // luckily we enforce that a membrane molecule must be anchored to exactly one membrane (named "Membrane") |
| 899 | + // alternatively we can check the Anchor site and get the membrane name "Membrane" from there |
| 900 | + if(lpmt.getAnchorList().size() != 1) { |
| 901 | + throw new RuntimeException("MembraneSubDomain particle must be anchored to one and only one Membrane"); |
| 902 | + } |
| 903 | + // we make sure elsewhere that it's a membrane |
| 904 | + locationName = lpmt.getAnchorList().get(0); |
| 905 | + } else { |
| 906 | + locationName = subDomain.getName(); |
| 907 | + } |
| 908 | + sb.append("MOLECULE: \"" + lpmt.getName() + "\" " + locationName + |
914 | 909 | " Number " + scount + |
915 | 910 | // number of site types and number of sites is the same for the vcell implementation of springsalad |
916 | 911 | " Site_Types " + lpmt.getComponentList().size() + " Total" + "_Sites " + lpmt.getComponentList().size() + |
|
0 commit comments