Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Mean calculation problem

by bobf (Monsignor)
on Jan 13, 2010 at 06:52 UTC ( #817118=note: print w/ replies, xml ) Need Help??


in reply to Mean calculation problem

I got stuck in the regex

I would suggest starting with CPAN rather than writing your own parser. Bio::Structure::IO, Chemistry::File::PDB, Chemistry::Mol all look relevant, and there are likely several more. If you use an existing module to do the low-level work, you can focus on the real reason you are writing the code (i.e., it isn't because you want to parse a PDB file, it is because you want to do something with the contents of the file).

If you insist on rolling your own parser, look at unpack. It is great for fixed-width data, and will likely be much faster and less buggy than any regex you assemble.

HTH


Comment on Re: Mean calculation problem

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://817118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (15)
As of 2014-08-01 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (20 votes), past polls