Skip to content

Commit

Permalink
new function sphere cut
Browse files Browse the repository at this point in the history
  • Loading branch information
ensemble-learning committed Jul 12, 2013
1 parent 6e73201 commit c0f5389
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/01_cut_a_sphere/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Generate a sphere from the pdb file

run:
python /home/tao/Nutstore/code/simupy/tools/build/sphere.py

The details can be set in "inp" file
7 changes: 7 additions & 0 deletions examples/01_cut_a_sphere/inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[SPHERE]
pdbfile = ca12.pdb ; input pdb file
center = 23.978 23.978 23.978 ; center of the sphere, usually we use the center of the box
radius = 12.8 ; radius of the sphere (in A)
atoms = Ca Al O ; Atom names in the pdb file
natoms = 12 14 33 ; Desired ratio
outfile = caalo_128.pdb ; Output pdb file
8 changes: 8 additions & 0 deletions lib/mytype.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ def assignEleTypes(self,):
match = pattern.match(b)
if match:
i.element= match.group(1)

def assignAtomTypes2(self,):
""" assign atomtypes according to the element types
specially designed for lammps data file
"""
self.assignEleTypes()
for i in self.atoms:
i.name = i.element

def assignAtomTypes(self,):
""" assign atomtypes according to the element types
Expand Down
2 changes: 0 additions & 2 deletions lib/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def get_angle(a1, a2, a3):
theta = np.arccos(cost)/np.pi * 180.0
return theta

def cut_circle():
pass

if __name__ == "__main__":
a = [3.4199999522999995 , 0.0000000000000000 , 0.0000000000000000]
Expand Down

0 comments on commit c0f5389

Please sign in to comment.