This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
file = open(‘liquid.325K.gro’, ‘r’) #読み込みモードでオープン | |
string = file.read() #readですべて読み込む | |
print(np.sum(string)) | |
print(np.mean(string)) | |
print(np.min(string)) | |
print(np.max()) |