atom-predict/egnn_v2/DataProcess.ipynb

133 lines
2.9 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"id": "85fe928f-0d10-43e8-a0bb-c4f41d66d762",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:31:54.112391Z",
"start_time": "2024-06-11T08:31:54.109993Z"
}
},
"outputs": [],
"source": [
"import os\n",
"import glob"
]
},
{
"cell_type": "markdown",
"id": "58d8c4c1-a153-4129-9e62-285d0b25dac7",
"metadata": {},
"source": [
"# Labeled data"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "d3bb8643-089c-453b-85c7-ee551e96e466",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:31:54.146387Z",
"start_time": "2024-06-11T08:31:54.142478Z"
}
},
"outputs": [],
"source": [
"for _type in ['train', 'valid', 'test']:\n",
" os.makedirs('../../data/linesv/gnn_data/{}/raw/'.format(_type), exist_ok=True)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b7024fc0-879e-4974-8c92-92e862857c40",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:31:54.159320Z",
"start_time": "2024-06-11T08:31:54.147643Z"
}
},
"outputs": [
{
"data": {
"text/plain": "0"
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"os.system('cp ../../data/linesv/slide/0.* ../../data/linesv/gnn_data/train/raw/')\n",
"os.system('cp ../../data/linesv/slide/3.* ../../data/linesv/gnn_data/valid/raw/')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "58801a78-2731-41e6-9801-ce59dd34d2d3",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:28:30.974354Z",
"start_time": "2024-06-11T08:28:30.945053Z"
}
},
"outputs": [],
"source": [
"for i in [2, 4, 6, 8, 10, 20, 30, 40]:\n",
" os.system('cp ../../data/linesv/slide/{}.* ../../data/linesv/gnn_data/test/raw/'.format(i))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "d42665a8-6f5d-45e3-8733-e3c8228be243",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:28:30.976997Z",
"start_time": "2024-06-11T08:28:30.975328Z"
}
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a64845df-1a5c-4fa3-b43d-c6af36353473",
"metadata": {
"ExecuteTime": {
"end_time": "2024-06-11T08:28:30.979078Z",
"start_time": "2024-06-11T08:28:30.977618Z"
}
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}