forked from d-SEAMS/PydSEAMSlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBPring.py
51 lines (44 loc) · 1.07 KB
/
BPring.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import bbdir.cyoda as cyoda
trajectory = "subprojects/seams-core/input/traj/clathrate-thf.lammpstrj"
# Get the frame
resCloud = cyoda.readLammpsTrjreduced(
filename=trajectory,
targetFrame=1,
typeI=1, # oxygenAtomType
isSlice=True,
coordLow=[0, 0, 0],
coordHigh=[34.728, 0, 0],
)
# Calculate the neighborlist by ID
nList = cyoda.neighListO(
rcutoff=3.5,
yCloud=resCloud,
typeI=1, # oxygenAtomType
)
# Get the hydrogen-bonded network for the current frame
hbnList = cyoda.populateHbonds(
filename=trajectory,
yCloud=resCloud,
nList=nList,
targetFrame=1,
Htype=2, # hydrogen atom type
)
# Hydrogen-bonded network using indices not IDs
hbnList = cyoda.neighbourListByIndex(
yCloud=resCloud,
nList=hbnList,
)
# Gets every ring (non-primitives included)
rings = cyoda.ringNetwork(
nList=hbnList,
maxDepth=6,
)
# Writes out primitive rings for a bulk system
ring = cyoda.bulkPolygonRingAnalysis(
path="runOne/", # outDir
rings=rings,
nList=hbnList,
yCloud=resCloud,
maxDepth=6,
firstFrame=1,
)