text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import os

import pandas as pd

import seaborn as sns

import os
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/train.csv')

def read_xyz(path, filename):
    return pd.read_csv(path + filename, skiprows=2, header=None, sep=' ', usecols=[0, 1, 2, 3], names=['atom', 'x', 'y', 'z'])
path = '../input/structures/'
filename = 'dsgdb9nsd_000001.xyz'
read_xyz(path, filename)

x_list = []
y_list = []
z_list = []
for filename in os.listdir('../input/structures'):
    x_list = x_list + list(read_xyz(path, filename)['x'])
    y_list = y_list + list(read_xyz(path, filename)['y'])
    z_list = z_list + list(read_xyz(path, filename)['z'])
dimfig, dimaxes = plt.subplots(3, 1, figsize=(6, 6))
sns.distplot(x_list, ax=dimaxes[0])
sns.distplot(y_list, ax=dimaxes[1])
sns.distplot(z_list, ax=dimaxes[2])
print('x max: ' + str(np.max(x_list)) + ' x min : ' + str(np.min(x_list)))
print('y max: ' + str(np.max(y_list)) + ' y min : ' + str(np.min(y_list)))
print('z max: ' + str(np.max(z_list)) + ' z min : ' + str(np.min(z_list)))