-
Notifications
You must be signed in to change notification settings - Fork 0
spider_silk_codes
Welcome to the spider_silk_codes wiki!
Contains code for the spider silk mechanical property prediction
Here we work on 5 mechanical properties: 1. strain at break, 2. ultimate tensile strength, 3. toughness, 4. Young's modulus, and 5. supercontraction
Each property folder contains 3 important files and should be run in the same order as mentioned below:
-
data_.ipynb: this is to create and choose features from the L representation in the paper. This created three .npy file: a. <property_name>.features : contains the numeric value of each input feature to NN, b. <property_name>.output : contains the numeric value of output property, and c, <property_name>.features_name : : contains the name of each input feature to NN
-
model_<property_name>.ipynb: this file divides the input and output data into train, valid, and test datasets. It then trains models on train data and shows the loss on the valid data to check for overfitting. This file saves the model after every epoch in the folder named "model"
-
test_<property_name>.ipynb: this tests the model on the test data set. Mention the correct epoch number by changing the value of the variable "epoch_check" for using the appropriate saved model from the "model" folder.
Predicting preperties for one sequence at a time
All the property folders have filename predict_<property_name>_for_single_sequence.ipynb. In that file enter the input for the variable user_input in the third fromn the last cell.
Mutation Study Protocol
- First run the model following the above protocols without any mutations and save the predicted property value for the test dataset (p1).
- Then in the data_<property_name>_with_mutation.ipynb file, in the last cell of the notebook input the value for m_spidroin, m_from and m_to.
- Then run the test_<property_name>_mutation.ipynb file to get the predicted property value for the test dataset (p2).
- Then quantify the effect of mutation by averaging the 100*(p1-p2)/p1.
- It is important to follow the above process with different random_state (atleast 5 different values) in cell 5 of the model_<property_name>.ipynb. Then average the percentage change over several different random_state.
Note:
- Before training any model, please make a folder named "model" to store the saved models during training.
- Raw data contains the repetitive sequence of spidroins. These files are obtained from https://spider-silkome.org/
- It is important to note that the models presented in this study are trained on dragline spider silk. Therefore the model's trained parameters cannot be used for other types of spider silk. But the models can be developed and trained from scrtach using the framework discussed in the paper.
коды_паучьего_шёлка Содержит код для прогнозирования механических свойств паучьего шелка.
Здесь мы работаем над 5 механическими свойствами : 1. деформация при разрыве, 2. предел прочности на растяжение, 3. ударная вязкость, 4. модуль Юнга и 5. сверхсжатие.
Каждая папка свойств содержит 3 важных файла и должна запускаться в том же порядке, что и указано ниже:
data_.ipynb : это для создания и выбора признаков из представления L в статье. Это создало три файла .npy: a. <property_name>.features : содержит числовое значение каждого входного признака для NN, b. <property_name>.output : содержит числовое значение выходного свойства, и c, <property_name>.features_name : : содержит имя каждого входного признака для NN
model_<имя_свойства>.ipynb : этот файл делит входные и выходные данные на обучающие, действительные и тестовые наборы данных. Затем он обучает модели на обучающих данных и показывает потери на действительных данных для проверки переобучения. Этот файл сохраняет модель после каждой эпохи в папке с именем "model"
test_<property_name>.ipynb : это тестирует модель на тестовом наборе данных. Укажите правильный номер эпохи, изменив значение переменной "epoch_check" для использования соответствующей сохраненной модели из папки "model".
Прогнозирование свойств для одной последовательности за раз Все папки свойств имеют имя файла predict_<имя_свойства>_for_single_sequence.ipynb . В этом файле введите входные данные для переменной user_input в третьей с последней ячейки.
Протокол исследования мутаций
Сначала запустите модель, следуя приведенным выше протоколам без каких-либо мутаций, и сохраните прогнозируемое значение свойства для тестового набора данных ( p1 ). Затем в файле data_<property_name>with_mutation.ipynb в последней ячейке блокнота введите значения для m_spidroin , m_from и m_to . Затем запустите файл test<property_name>mutation.ipynb, чтобы получить прогнозируемое значение свойства для тестового набора данных ( p2 ). Затем количественно оцените эффект мутации, усреднив 100*(p1-p2)/p1. Важно следовать вышеописанному процессу с различными random_state (не менее 5 различных значений) в ячейке 5 model<property_name>.ipynb. Затем усредните процентное изменение по нескольким различным random_state. Примечание :
Перед обучением любой модели создайте папку с названием «модель» для хранения сохраненных во время обучения моделей. Необработанные данные содержат повторяющуюся последовательность спидроинов. Эти файлы получены с https://spider-silkome.org/ Важно отметить, что модели, представленные в этом исследовании, обучены на паутине драглайна. Поэтому обученные параметры модели не могут быть использованы для других типов паутины. Но модели могут быть разработаны и обучены с нуля с использованием фреймворка, обсуждаемого в статье .
https://www.youtube.com/watch?v=2hf9yN-oBV4
I Grew Real Spider Silk Using Yeast

project list:
https://github.com/barionleg/Spider-Web-Simulation
https://github.com/barionleg/Biosteel_UTMOST
https://aibolem.github.io/svaerchok_nortkan/docs/main.html
https://github.com/aibolem/svaerchok_nortkan
https://github.com/aibolem/spider-silk-hardware
https://github.com/barionleg/bionetsim
https://github.com/barionleg/OpenSyringePump
https://aibolem.github.io/spider-silk-hardware/html/esilkprojectthesis.html
https://aibolem.github.io/spider-silk-hardware/html/esilkproject_ru.html
https://aibolem.github.io/spider-silk-hardware/html/SyringePumpGuide.html
https://aibolem.github.io/spider-silk-hardware/html/syringepumpassemblyguide.html
https://github.com/barionleg/wiki_nortkan