Open omkantnirala opened 5 years ago
It seems that your xyz format is wrong. You can go to this link to check the format: https://order.readthedocs.io/en/latest/tutorials/tutorial.html You can also find the example through this link: https://github.com/ipudu/order/tree/master/examples/order-parameters
Can you help me for writing abc.xyz in given format. I wrote the coordinate file through MDAnalysis script. But from that script i am unable to write atom number and box length. Here i am using this script-
import MDAnalysis as mda u = mda.Universe('nptmd.tpr', 'nptmd.xtc')
w = u.select_atoms("resname SOL and name OW")
with mda.Writer("ow.xyz", n_atoms=w.n_atoms) as W:
for ts in u.trajectory:
W.write(w)`
Thank you,
The xyz format for order should be as follows:
number_of_atoms
boxx boxy boxz
atom_number x y z
.............
I assume that MDAnalysis cannot write box lengths to the xyz file.
If there are no blank lines between frames and every 2nd line of your frame is blank, you can use following vim command to write box lengths to your xyz file:
:%s/^$/boxx\ boxy\ boxz/g
replace boxx, boxy and boxz with real box length.
Please let me know if you can fix the problem.
When i am using to find out order parameter it is giving error like as,
Traceback (most recent call last): File "/home/workstation/anaconda3/lib/python3.5/site-packages/order/XYZ.py", line 68, in read_next_frame self.box_size[frame] = np.array(list(map(float, box)), dtype=np.float) ValueError: could not convert string to float: 'OW'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/workstation/anaconda3/bin/order", line 11, in
load_entry_point('iOrder==0.0.3', 'console_scripts', 'order')()
File "/home/workstation/anaconda3/lib/python3.5/site-packages/order/order.py", line 43, in command_line_runner
reader = XYZ.XYZLoader(args['input'])
File "/home/workstation/anaconda3/lib/python3.5/site-packages/order/XYZ.py", line 35, in init
self.read_all_frames()
File "/home/workstation/anaconda3/lib/python3.5/site-packages/order/XYZ.py", line 102, in read_all_frames
self.read_next_frame(frame)
File "/home/workstation/anaconda3/lib/python3.5/site-packages/order/XYZ.py", line 78, in read_next_frame
raise EOFError(err)
EOFError: could not convert string to float: 'OW'
How Can i remove that error. Can anybody help me regarding this issue.