Sponsored Content
Full Discussion: Calculate root mean square?
Top Forums Shell Programming and Scripting Calculate root mean square? Post 302954490 by liuzhencc on Tuesday 8th of September 2015 12:45:30 PM
Old 09-08-2015
Thanks so much for the script. It works like a charm.
Would you please give me some explanation about this script? How does it works so fast. Since you use unformatted print inside awk, so the bond title and bond distance are not aligned with each other if there are hundreds of bond.
for instance, there are 19 bond titles and 24 distances
Code:
P2-Cr1 N3-Cr1 P4-Cr1 C5-Cr1 C6-Cr1 C7-Cr1 C8-Cr1 C9-Cr1 C10-Cr1 C11-Cr1 C12-Cr1 C13-Cr1 C14-Cr1 C15-Cr1 C16-Cr1 C17-Cr1 C18-Cr1 C19-Cr1 C20-Cr1
2.270 2.872 2.249 3.526 3.961 5.272 6.070 5.812 4.655 3.494 3.886 5.197 6.016 5.787 4.646 3.486 3.883 5.197 6.017 5.785 4.641 3.490 4.027 5.305

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

2. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

3. Shell Programming and Scripting

Math Square Root

Hi I just stumbled on to these forums today, and I relatively new to unix. I am trying to figure out how to find the square root of a number using a shell script. I am using bash and I have searched and searched but cannot figure out square roots. Hopefully someone can point me in the right... (3 Replies)
Discussion started by: davex4285
3 Replies

4. UNIX for Dummies Questions & Answers

Area of a square

I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run. #!/bin/bash #script to find area of a square based on user input if then echo " Usage -$0 x " echo " where x is the dimension of the square " exit 1 n1=$1 ... (2 Replies)
Discussion started by: SnydeMz
2 Replies

5. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

6. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

7. Shell Programming and Scripting

AWK script for standard deviation / root mean square deviation

I have a file with say 50 columns, each containing a whole lot of data. Each column contains data from a separate simulation, but each simulation is related to the data in the last (REFERENCE) column $50 I need to calculate the RMS deviation for each data line, i.e. column 1 relative to... (12 Replies)
Discussion started by: chrisjorg
12 Replies

8. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

9. Shell Programming and Scripting

Mean square root error from different files

For example, I have files called A.txt and B.txt. A.txt #x yj 1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100B.txt #x ^yj 1 1 2 8 3 27 4 64 5 125 6 216 (2 Replies)
Discussion started by: Tzeronone
2 Replies

10. What is on Your Mind?

The square root code I coded on this site...

Hi all, (mainly Neo)... I keep noticing that the SQRT code I wrote recently for a POSIX shell keeps appearing, (the green colour sticks out like a sore thumb). So I decided to take a look on Google. Guess what? UNIX.COM comes first in Google's listing just from two words, see image... (2 Replies)
Discussion started by: wisecracker
2 Replies
FMCS(1) 							   User Commands							   FMCS(1)

NAME
fmcs - fmcs DESCRIPTION
usage: fmcs [-h] [--maximize {atoms,bonds}] [--min-num-atoms INT] [--compare {topology,elements,types}] [--atom-compare {any,elements,isotopes}] [--bond-compare {any,bondtypes}] [--atom-class-tag TAG] [--ring-matches-ring-only] [--complete-rings-only] [--select SELECT] [--timeout SECONDS] [--output FILENAME] [--output-format {smarts,fragment-smiles,fragment-sdf,complete-sdf}] [--output-all] [--save-atom-class-tag TAG] [--save-counts-tag TAG] [--save-atom-indices-tag TAG] [--save-smarts-tag TAG] [--save-smiles-tag TAG] [--times] [-v] [--version] filename Find the maximum common substructure of a set of structures positional arguments: filename SDF or SMILES file optional arguments: -h, --help show this help message and exit --maximize {atoms,bonds} Maximize the number of 'atoms' or 'bonds' in the MCS. (Default: bonds) --min-num-atoms INT Minimimum number of atoms in the MCS (Default: 2) --compare {topology,elements,types} Use 'topology' as a shorthand for '--atom-compare any --bond-compare any', 'elements' is '--atom-compare elements --bond-compare any', and 'types' is '--atomcompare elements --bond-compare bondtypes' (Default: types) --atom-compare {any,elements,isotopes} Specify the atom comparison method. With 'any', every atom matches every other atom. With 'elements', atoms match only if they con- tain the same element. With 'isotopes', atoms match only if they have the same isotope number; element information is ignored so [5C] and [5P] are identical. This can be used to implement user-defined atom typing. (Default: elements) --bond-compare {any,bondtypes} Specify the bond comparison method. With 'any', every bond matches every other bond. With 'bondtypes', bonds are the same only if their bond types are the same. (Default: bondtypes) --atom-class-tag TAG Use atom class assignments from the field 'TAG'. The tag data must contain a space separated list of integers in the range 1-10000, one for each atom. Atoms are identical if and only if their corresponding atom classes are the same. Note that '003' and '3' are treated as identical values. (Not used by default) --ring-matches-ring-only Modify the bond comparison so that ring bonds only match ring bonds and chain bonds only match chain bonds. (Ring atoms can still match non-ring atoms.) --complete-rings-only If a bond is a ring bond in the input structures and a bond is in the MCS then the bond must also be in a ring in the MCS. Selecting this option also enables --ring-matches-ring-only. --select SELECT Select a subset of the input records to process. Example: 1-10,13,20,50- (Default: '1-', which selects all structures) --timeout SECONDS Report the best solution after running for at most 'timeout' seconds. Use 'none' for no timeout. (Default: none) --output FILENAME, -o FILENAME Write the results to FILENAME (Default: use stdout) --output-format {smarts,fragment-smiles,fragment-sdf,complete-sdf} 'smarts' writes the SMARTS pattern including the atom and bond criteria. 'fragment-smiles' writes a matching fragment as a SMILES string. 'fragment-sdf' writes a matching fragment as a SD file; see --save-atom-class for details on how atom class information is saved. 'complete-sdf' writes the entire SD file with the fragment information stored in the tag specified by --save-frag- ment-indices-tag. (Default: smarts) --output-all By default the structure output formats only show an MCS for the first input structure. If this option is enabled then an MCS for all of the structures are shown. --save-atom-class-tag TAG If atom classes are specified (via --class-tag) and the output format is 'fragment-sdf' then save the substructure atom classes to the tag TAG, in fragment atom order. By default this is the value of --atomclass-tag. --save-counts-tag TAG Save the fragment count, atom count, and bond count to the specified SD tag as space separated integers, like '1 9 8'. (The fragment count will not be larger than 1 until fmcs supports disconnected MCSes.) --save-atom-indices-tag TAG If atom classes are specified and the output format is 'complete-sdf' then save the MCS fragment atom indices to the tag TAG, in MCS order. (Default: mcs-atomindices) --save-smarts-tag TAG Save the MCS SMARTS to the specified SD tag. Uses '-' if there is no MCS --save-smiles-tag TAG Save the fragment SMILES to the specified SD tag. Uses '-' if there is no MCS --times Print timing information to stderr -v, --verbose Print progress statistics to stderr. Use twice for higher verbosity. --version For more details on these options, see https://bitbucket.org/dalke/fmcs/ fmcs 1.0 June 2012 FMCS(1)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy