Don't neglect the health of your body;
eating, drinking and moving, all must be in moderation.
——Pythagoras(Ancient Greek Mathematician)
Metabolism plays a crucial role in human health and disease, and weight management is a hot
topic concerning it.
Here, we propose a web-based simulator to predict the recommended
calorie intake during weight loss and also to give personalized diet plans.
Allow users to make personalized calorie and physical activity plans to reach a goal weight within a specific time and to maintain it afterward.
Recommend personalized diet plans for Chinese based on the calculated daily calorie intake above.
Fig 1. The usage flow of the Body Planner
Research shows that changes in body weight are related to an imbalance between the energy content of the food eaten and the energy expended by the body to sustain life and perform physical work. Any successful intervention for obesity (e.g. diet, exercise, medication, bariatric surgery, etc.) must alter the balance between energy intake and expenditure.
In K.D.s' work, they introduce a validated web-based dynamic simulation model of adult human metabolism that predicts the time course of individual weight change in response to behavioral interventions, which can be clinically useful to help set personalized weight-loss goals and track adherence to the intervention. 1,2
Based on the algorithm model above, when the users input their information about their current weight, goal weight, and goal time to reach the target, we can get the total energy intake per day to maintain their current weight, achieve their goal weight, and maintain their goal weight.
Subsequently, we obtained the data of 148 kinds of common foods in our daily life with their respective fat, carbohydrate, and protein content from the Virtual Metablic Health database3.
food material | lipid(g/100g) | protein(g/100g) | carbohydrate(g/100g) |
peanut oil | 100 | 0 | 0 |
soymilk | 1.75 | 3.27 | 6.28 |
goat milk | 7 | 5.98 | 5.36 |
milk | 3.25 | 3.15 | 4.8 |
yogurt | 3.25 | 3.47 | 4.66 |
sesame | 49.67 | 17.73 | 23.45 |
sunflower seeds | 51.46 | 20.78 | 20 |
acorn | 31.41 | 8.1 | 53.66 |
almond | 52.54 | 20.96 | 21.01 |
cashew nut | 46.35 | 15.31 | 32.69 |
chestnut | 1.81 | 6.82 | 79.76 |
hazel | 62.4 | 15.03 | 17.6 |
gingko | 2 | 10.35 | 72.45 |
macadamia nut | 76.08 | 7.79 | 13.38 |
pistachio nut | 45.82 | 21.05 | 28.28 |
walnut | 59.33 | 24.06 | 9.58 |
peanut | 49.24 | 25.8 | 16.13 |
soybean | 6.8 | 12.95 | 11.05 |
raw egg | 9.51 | 12.56 | 0.72 |
raw duck egg | 14.77 | 12.81 | 1.45 |
quail egg | 11.09 | 13.05 | 0.41 |
chicken | 15.06 | 18.6 | 0 |
duck | 39.4 | 11.49 | 0 |
pigeon | 23.8 | 18.47 | 0 |
mutton(lean:fat=1:1) | 20.94 | 24.52 | 0 |
mutton(lean) | 4.51 | 20.56 | 0 |
pork sausage | 27.25 | 18.53 | 1.42 |
Chinese sausage | 28.23 | 11.98 | 0.94 |
beef(lean:fat=1:1) | 17.37 | 28.97 | 0 |
beef(lean) | 6.29 | 21.72 | 0 |
pork(lean) | 5.64 | 20.76 | 0 |
pork(lean:fat=1:1) | 35.07 | 13.91 | 0 |
pork rib | 4.8 | 21.79 | 0 |
apple | 0.17 | 0.26 | 13.81 |
apricot | 0.39 | 1.4 | 11.12 |
avocado | 14.66 | 2 | 8.53 |
banana | 0.33 | 1.09 | 22.84 |
blackberry | 0.49 | 1.39 | 9.61 |
blueberry | 0.33 | 0.74 | 14.49 |
carambola | 0.33 | 1.04 | 6.73 |
cherry | 0.3 | 1 | 12.18 |
cranberry | 1.09 | 0.17 | 82.8 |
fig | 0.3 | 0.75 | 19.18 |
grapefruit | 0.1 | 0.63 | 8.08 |
grape | 0.16 | 0.72 | 18.1 |
jackfruit | 0.64 | 1.72 | 23.25 |
jujube | 0.2 | 1.2 | 20.23 |
kiwifruit | 0.52 | 1.14 | 14.66 |
kumquat | 0.86 | 1.88 | 15.9 |
lemon | 0.3 | 1.1 | 9.32 |
litchi | 0.44 | 0.83 | 16.53 |
loquat | 0.2 | 0.43 | 12.14 |
mango | 0.38 | 0.82 | 14.98 |
hami melon | 0.19 | 0.84 | 8.16 |
melon | 0.1 | 1.11 | 6.58 |
mulberry | 0.39 | 1.44 | 9.8 |
nectarine | 0.32 | 1.06 | 10.55 |
orange | 0.12 | 0.94 | 11.75 |
madarin orange | 0.31 | 0.81 | 13.34 |
pawpaw | 0.26 | 0.47 | 10.82 |
passion fruit | 0.7 | 2.2 | 23.38 |
peach | 0.06 | 0.44 | 6.11 |
pear | 0.23 | 0.5 | 10.65 |
persimmon | 0.19 | 0.58 | 18.59 |
pineapple | 0.12 | 0.54 | 13.12 |
pomegranate | 1.17 | 1.67 | 18.7 |
strawberry | 0.3 | 0.67 | 7.68 |
watermelon | 0.15 | 0.61 | 7.55 |
coconut | 33.49 | 3.33 | 15.23 |
carp | 5.6 | 17.83 | 0 |
catfish | 2.82 | 16.38 | 0 |
caviar | 17.9 | 24.6 | 4 |
gadus | 0.67 | 17.81 | 0 |
yellow croaker | 3.17 | 17.78 | 0 |
flatfish | 1.93 | 12.41 | 0 |
herring | 9.04 | 17.96 | 0 |
mackerel | 14.89 | 18.6 | 0 |
jewfish | 1.87 | 18.51 | 0 |
bass | 0.92 | 19.39 | 0 |
mullet | 0.69 | 19.26 | 0 |
salmon | 6.34 | 19.84 | 0 |
sardine | 11.45 | 24.62 | 0 |
bream | 1.34 | 20.51 | 0 |
sturgeon | 4.04 | 16.14 | 0 |
skipjack | 6.65 | 19.66 | 0 |
tuna | 4.9 | 23.33 | 0 |
trout | 5.86 | 19.09 | 0 |
crab | 1.08 | 18.06 | 0.04 |
cray | 0.95 | 15.97 | 0 |
lobster | 0.75 | 16.52 | 0 |
shrimp | 1.01 | 13.61 | 0.91 |
abalone | 0.76 | 17.1 | 6.01 |
clam | 0.96 | 14.67 | 3.57 |
oyster | 1.71 | 5.71 | 2.72 |
scallop | 0.49 | 12.06 | 3.18 |
sleeve fish | 1.38 | 15.58 | 3.08 |
asparagus | 0.12 | 2.2 | 3.88 |
bitter gourd | 0.17 | 1 | 3.7 |
bamboo shoots | 0.3 | 2.6 | 5.2 |
mung bean | 0.18 | 3.04 | 5.94 |
beet | 0.17 | 1.61 | 9.56 |
broccoli | 0.37 | 2.82 | 6.64 |
cabbage | 0.1 | 1.28 | 5.8 |
carrot | 0.24 | 0.93 | 9.58 |
cauliflower | 0.28 | 1.92 | 4.97 |
celery | 0.17 | 0.69 | 2.97 |
cocozelle | 0.13 | 0.82 | 4.51 |
chrysanthemum | 0.56 | 3.36 | 3.02 |
kale | 0.61 | 3.02 | 5.42 |
corn | 1.35 | 3.27 | 18.7 |
cowpea | 0.35 | 2.95 | 18.83 |
long bean | 0.4 | 2.8 | 8.35 |
cucumber | 0.11 | 0.65 | 3.63 |
eggplant | 0.18 | 0.98 | 5.88 |
lettuce | 0.2 | 1.25 | 3.35 |
calabash | 0.02 | 0.62 | 3.39 |
hyacinth bean | 0.2 | 2.1 | 9.19 |
agaric | 0.04 | 0.48 | 6.75 |
mushroom | 0.49 | 2.24 | 6.79 |
Chinese chives | 0.3 | 1.5 | 14.15 |
Chinese leaf | 0.22 | 1.35 | 2.23 |
lotus root | 0.1 | 2.6 | 17.23 |
leaf mustard | 0.42 | 2.86 | 4.67 |
akra | 0.19 | 1.93 | 7.45 |
onion | 0.1 | 1.1 | 9.34 |
pea | 0.2 | 2.8 | 7.55 |
green pepper | 0.17 | 0.86 | 4.64 |
pumpkin | 0.1 | 1 | 6.5 |
purslane | 0.36 | 2.03 | 3.39 |
summer radish | 0.1 | 0.68 | 3.4 |
kelp | 0.03 | 0.54 | 6.75 |
spinach | 0.39 | 2.86 | 3.63 |
squash | 0.27 | 1.01 | 3.88 |
water spinach | 0.2 | 2.6 | 3.14 |
tomato | 0.2 | 0.88 | 3.89 |
turnip | 0.1 | 0.9 | 6.43 |
wax gourd | 0.2 | 0.4 | 3 |
green soybean | 6.8 | 12.95 | 11.05 |
cactus | 0.09 | 1.32 | 3.33 |
tofu | 3.69 | 7.17 | 1.18 |
Chinese cabbage | 0.2 | 1.5 | 2.18 |
bread | 1.5 | 5.2 | 43.3 |
rice | 0.66 | 7.13 | 79.95 |
mantou | 1.1 | 7 | 47 |
bean vermicelli | 0.2 | 0.8 | 83.7 |
spaghetti | 1.92 | 1.54 | 10 |
pie | 34.6 | 6.4 | 47.5 |
noodles | 15.43 | 8.11 | 72.8 |
sweet potato | 0.05 | 1.57 | 20.12 |
taro | 0.2 | 1.5 | 26.46 |
potato | 0.09 | 2.05 | 17.49 |
Chinese yam | 0.1 | 1.34 | 16.3 |
Table 1. The data of 148 kinds of common foods in our daily life
On this basis, healthy diets are recommended by the Dietary Guidelines for Chinese Residents, which align with Chinese dietary habits.4
The Dietary Guidelines for Chinese Residents require residents to consume 20-30g of oil, 300-500g of milk, 25-35g of nuts, 120-200g of meat (twice a week is recommended for aquatic foods and one egg a day), 300-500g of vegetables, 200-350g of fruit, 50-100g of potatoes, 200-300g of cereals, and it is recommended that the daily intake of food should be at least twelve types. It is also suggested that the most suitable dietary nutrition ratio for Chinese people is fat: protein: carbohydrate = 0.3:0.17:0.53.
Fig 2. Recommended nutrition intake for Chinese people
From this, we have divided all foods into ten broad groups of oil, milk, nuts, meat (land animals), eggs, aquatic foods, vegetables, fruit, potatoes, and cereals to facilitate diet recommendations.
The following assumptions have been made to simplify matters.
The total weight of each food group is equally proportional, which is k within its floating range.
The recommended daily intake of one oil, one milk, one nut, one egg, two types of meat, three vegetables, one potato, and two types of cereal for a total of 12 food items for users is in line with the guidelines for dietary diversity.
Considering that the intake of oil is not easy to control and has a small range of variation, while the intake of nuts, milk and eggs depends more on the packaging of the food (people often eat a bag of nuts, a carton of milk and an egg), we set fixed daily intakes for the four food groups mentioned above.
The process of generating the recommended diet is divided into two steps. The first step is to randomly select one oil, one milk, one nut, one egg, two meat, three vegetables, one potato and two cereals from the 148 foods in the database, and the second step is to find the weight of each food that should be consumed. The first step we implement directly with random function of python, and the second step is a process of solving the equation. Assuming that $a_1$ is the proportion of the first of the two types of meat, $v_1$ is the proportion of the first of the vegetables, $v_2$ is the proportion of the second, $g_1$ is the proportion of the first of the two types of cereals, and $k$ is the proportion of several foods in several ranges, there are still five variables to be determined, $k$, $a_1$, $v_1$, $v_2$, $g_1$, given that the picked foods are determined. Considering that there are three constraints, i.e., total fat, protein, and carbohydrate content of 12 foods, two of the five variables can be generated randomly, and the problem is then transformed into a 3-element system of multiple equations. After solving the above system of equations, the recommended diets can be obtained.
A detailed user manual is provided.
1. Hall K D, Sacks G, Chandramohan D, et al. Quantification of the effect of energy imbalance on bodyweight[J]. The Lancet, 2011, 378(9793): 826-837.
2. mrqsdavi (2020) body_weight_planner_calc(Version 1.0). https://github.com/mrqsdavi/body_weight_planner_calc.
3. The Virtual Metabolic Human database: integrating human and gut microbiome metabolism with nutrition and disease.[J]. Nucleic acids research, 2018.
4. Dietary Guidelines for Chinese residents, Chinese Nutrition Society, People's Medical Publishing House, 2022