### Cell Specific Plugin Energy

78
views
0
27 days ago by
Dear all,

I saw the post below for deltaH and am wondering its it's possible to extract a specific plugin energy for a specific cell. For example, if neighbor order is set to 2 and we have cell 1 surrounded by other cells, is it possible to extract the total contact energy cell 1 shares with its environment? Ideally, I would like to do this in python if possible.

Also forgot to include, as long as the lattice is relatively larger than the cpu, will these extracted plugin energies be "accurate" if I run CC3D in parallel? By accurate I mean the energy is effectively not modified twice in the same MCS by 2 or more cpus.  My sim conditions are: 10-16 cpus on a 100x100x100 lattice with default flip to dim ratio, which I believe is 1).

Sorry for the long paragraph and thanks!
Community: CompuCell3D

0
27 days ago by
I don't think the per-cell data is available (Maciek would know for sure). If you are only doing a few cells, and only occasionally, you might be able to re-calculate the energies of interest in python.

What are you trying to do? If you want to modify the adhesion properties of a cell based on its adhesion partners I think you could do that more efficiently by just using the contact surface area to modify the adhesion constant or to modify the expression level of the adhesion molecules.

Regarding the use of multiple CPUs, I think the only time the energies would be inaccurate would be if you were tracking them on a per spin flip attempt basis. Normally you would access the energy at the end of an MCS so all the cpu's will have completed their work for that step.
Thanks for the help. This is mainly a parameter issue for me at this point.

I am trying to access the per cell data as a way to calibrate temperature in cellular potts.

I have been using the modified contact surface area method but I still need to choose a number like 100 for the maximum possible temperature for any cell. Therefore, cells will have temperature between ~0-100.

Essentially I am trying to avoid the use of the arbitrary baseline temperature parameter.

Thanks again!
written 27 days ago by Calvin
0
23 days ago by
So this type of information would require some C++ coding. As of now  you cannot see every energy term that CC3D handles in the C++ code. Another issue is that we actually do not calculate "absolute" energy but rather a change in energy due to a pixel copy attempt.

The demos that output detailed "energy statistics" (see Demo/SimulationSettings/SimulationStatistics) do require that you run on a single CPU. In fact before you start runing CC3D on multiple CPU's it is best to make sure your simulation works fine on 1 CPU.

So in summary, if you really need that detailed level of output you would need to compile CC3D from source and modify e.g. contact plugin to output this information. It is not difficult to do but exposing such capability to Python has not been done.

Hope it helps
0
23 days ago by
the following demo
Demo/SimulationSettings/SimulationStatistics/spin_flip_stats

will output detailed data for change in energy at ever pixel copy attempt. It does not however output which cell it a given pixel belongs to. This is however something we could add to the code

when you add the following code to the Potts section
   <EnergyFunctionCalculator Type="Statistics">
<OutputFileName Frequency="10">cellsort_2D_statistics_spin_flip_statData.txt</OutputFileName>
<OutputCoreFileNameSpinFlips Frequency="1" GatherResults="" OutputAccepted="" OutputRejected="" OutputTotal="">statDataSingleFlip</OutputCoreFileNameSpinFlips>
</EnergyFunctionCalculator>
​
CC3D will output 3 files (they will be stored in the directory from which you execute CC3D Player - most likely <CC3D installation dir>/player5 - thi sia a bit of an inconvenience - we will fix it though)
statDataSingleFlip.accepted.txt
statDataSingleFlip.rejected.txt
statDataSingleFlip.total.txt
Those files have information about what happened at ever pixel copy.

we could add more information  there to make it more usefu.l What type of information would you like to have included in addition to the one that we output currently?

Hi

Regarding the SimulationStatistics, the information given there already works great for me. I do have one more question about using multiple CPUS. I'm able to still get energy output despite using multiple CPUS if I use the change number of worknodes code in python. Is the energy output there still "accurate", so long as the cell in general is much larger than the number of CPUS used? I've tested both single and multi CPU but I can't detect if the difference is just due to fluctuations or the actual CPUS.

Thanks you both for all the help! It is much appreciated.

written 21 days ago by Calvin