Feb-27-2020, 08:41 AM
Hi,
I want to use numpy command to read a matrix which is string format of positions of some atoms, for example, as follows:
['2.8320639688889e+00 8.2431195922222e+00 5.5456174000000e-01'
'2.8490815888889e+00 1.0658281305556e+01 1.9802577466667e+00'
'2.8277318833333e+00 8.2326359600000e+00 1.9737453877778e+00']
and writes converted positions to the float number and merge with atoms symbols (which is another read list containing carbon, hydrogen, and oxygen atoms: C, H, O):
C 2.8320639688889 8.2431195922222 0.55456174000000
H 2.8490815888889 10.658281305556 1.9802577466667
O 2.8277318833333 8.2326359600000 1.9737453877778
Please note that the first format comes from reading by readlines command.
Thanks in advance
I want to use numpy command to read a matrix which is string format of positions of some atoms, for example, as follows:
['2.8320639688889e+00 8.2431195922222e+00 5.5456174000000e-01'
'2.8490815888889e+00 1.0658281305556e+01 1.9802577466667e+00'
'2.8277318833333e+00 8.2326359600000e+00 1.9737453877778e+00']
and writes converted positions to the float number and merge with atoms symbols (which is another read list containing carbon, hydrogen, and oxygen atoms: C, H, O):
C 2.8320639688889 8.2431195922222 0.55456174000000
H 2.8490815888889 10.658281305556 1.9802577466667
O 2.8277318833333 8.2326359600000 1.9737453877778
Please note that the first format comes from reading by readlines command.
Thanks in advance