Tag Info

Hot answers tagged

5

I am not familiar with the specific output format you need but I think I can show you how to proceed. dat = Import["ExampleData/caffeine.xyz", {{"VertexTypes", "VertexCoordinates"}}]; dat2 = {#[[1, 1]], #[[All, 2]]} & /@ GatherBy[dat\[Transpose], First]; dat3 = {#, Length@#2, #2} & @@@ dat2; dat3 has this format: dat3 // TableForm $\left( ...


1

This is my attempt at producing the output style that you desire where i have assumed that all co-ordinates should be padded with three zeroes at the end. data = Import[ "ExampleData/caffeine.xyz", {{"VertexTypes", "VertexCoordinates"}}]; Gather co-ordinates of same elements table = Table[ If[data[[1, #]] == data[[1, i]], Sow[N[data[[2, i]]/100]], ...



Only top voted, non community-wiki answers of a minimum length are eligible