Replies: 1 comment 12 replies
-
Hi and thanks for reporting this! Could you let me know which numpy version
you are using? I think I know what the problem is and I’ll fix it as soon
as possible.
…On Thu, 9 May 2024 at 19:22, lubilok ***@***.***> wrote:
Hi,
I was trying to find out the true interface of the liquid/vapor interface
in my system using Pytim modules, but I am getting an error like below
import MDAnalysis as mda
import pytim
u = mda.Universe("md_0_1.gro")
interface = pytim.ITIM(u)
interface.writepdb('layers.pdb',centered='middle')
upper_layer = interface.layers[0,0]
AttributeError Traceback (most recent call last)
/tmp/ipykernel_80284/2357494757.py in
4 # initialize the interface, this has to be called only once
5 # before iterating over the trajectory!
----> 6 interface = pytim.ITIM(u)
7
8 # write a pdb with the information on the surface layers
~/anaconda3/lib/python3.9/site-packages/pytim/itim.py in init(self,
universe, group, alpha, normal, molecular, max_layers, radii_dict,
cluster_cut, cluster_threshold_density, extra_cluster_groups, info,
centered, warnings, mesh, autoassign, **kargs)
217 cluster_threshold_density, extra_cluster_groups)
218 sanity.assign_normal(normal)
--> 219 sanity.assign_radii(radii_dict=radii_dict)
220
221 self.grid = None
~/anaconda3/lib/python3.9/site-packages/pytim/sanity_check.py in
assign_radii(self, radii_dict)
146 self.patch_radii_dict()
147
--> 148 _missing_attributes(self.interface, self.interface.universe)
149
150 try:
~/anaconda3/lib/python3.9/site-packages/pytim/properties.py in
_missing_attributes(interface, universe)
72 _check_missing_attribute(interface, 'elements', 'Elements',
universe.atoms,
73 1)
---> 74 _extra_attributes(interface, universe)
75
76
~/anaconda3/lib/python3.9/site-packages/pytim/properties.py in
_extra_attributes(interface, universe)
81 for key in attr.keys():
82 if key not in dir(universe.atoms):
---> 83 vals = np.zeros(len(universe.atoms), dtype=np.int) - 1
84 universe.add_TopologyAttr(attrkey
<https://github.com/MDAnalysis/mdanalysis/discussions/vals>)
85
~/anaconda3/lib/python3.9/site-packages/numpy/init.py in getattr(attr)
282 return Tester
283
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(name, attr))
286
AttributeError: module 'numpy' has no attribute 'int'
Please tell me how I can fix it.
Thank you.
—
Reply to this email directly, view it on GitHub
<#405>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADRZDYOPF65BWPA3HWG65TZBO5ERAVCNFSM6AAAAABHPIYN36VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGYZTMNZYGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was trying to find out the true interface of the liquid/vapor interface in my system using Pytim modules, but I am getting an error like below
import MDAnalysis as mda
import pytim
u = mda.Universe("md_0_1.gro")
interface = pytim.ITIM(u)
interface.writepdb('layers.pdb',centered='middle')
upper_layer = interface.layers[0,0]
AttributeError Traceback (most recent call last)
/tmp/ipykernel_80284/2357494757.py in
4 # initialize the interface, this has to be called only once
5 # before iterating over the trajectory!
----> 6 interface = pytim.ITIM(u)
7
8 # write a pdb with the information on the surface layers
~/anaconda3/lib/python3.9/site-packages/pytim/itim.py in init(self, universe, group, alpha, normal, molecular, max_layers, radii_dict, cluster_cut, cluster_threshold_density, extra_cluster_groups, info, centered, warnings, mesh, autoassign, **kargs)
217 cluster_threshold_density, extra_cluster_groups)
218 sanity.assign_normal(normal)
--> 219 sanity.assign_radii(radii_dict=radii_dict)
220
221 self.grid = None
~/anaconda3/lib/python3.9/site-packages/pytim/sanity_check.py in assign_radii(self, radii_dict)
146 self.patch_radii_dict()
147
--> 148 _missing_attributes(self.interface, self.interface.universe)
149
150 try:
~/anaconda3/lib/python3.9/site-packages/pytim/properties.py in _missing_attributes(interface, universe)
72 _check_missing_attribute(interface, 'elements', 'Elements', universe.atoms,
73 1)
---> 74 _extra_attributes(interface, universe)
75
76
~/anaconda3/lib/python3.9/site-packages/pytim/properties.py in _extra_attributes(interface, universe)
81 for key in attr.keys():
82 if key not in dir(universe.atoms):
---> 83 vals = np.zeros(len(universe.atoms), dtype=np.int) - 1
84 universe.add_TopologyAttr(attrkey)
85
~/anaconda3/lib/python3.9/site-packages/numpy/init.py in getattr(attr)
282 return Tester
283
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(name, attr))
286
AttributeError: module 'numpy' has no attribute 'int'
Please tell me how I can fix it.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions