Wiki

If you are a group member, please login to the internal wiki https://sites.google.com/site/dxulabwiki/

  • SCM-ADF https://www.scm.com/doc/Installation/Linux_Quickstart_Guide.htmlADF2017 uses VTK7 and newer OpenGL features to dramatically speed up the visualization of large systems. This comes with a ...
    Posted Apr 26, 2017, 2:09 PM by Dong Xu
  • Encrypt shell script How to: http://www.thegeekstuff.com/2012/05/encrypt-bash-shell-script/?utm_source=tuicoolDownload shc: http://www.datsi.fi.upm.es/~frosal/shc -r -f ./scriptAlternative: https ...
    Posted Apr 26, 2017, 12:56 PM by Dong Xu
  • Rdkit Cairo Fix for Drawing Molecules from rdkit import Chemfrom rdkit.Chem import AllChemfrom rdkit.Chem import DrawAllChem.Compute2DCoords(m)m = Chem.MolFromSmiles('c1nccc2n1ccc2')Draw.MolToFile(m,'/tmp/test.png')Errors pops up ...
    Posted Apr 18, 2017, 5:00 PM by Dong Xu
  • Linux Cheat Sheet
    Posted Apr 11, 2017, 5:30 PM by Dong Xu
  • Anaconda conda https://stackoverflow.com/questions/34441943/ipython-installed-but-not-foundipython in Schrodinger virtual env http://content.schrodinger.com/Docs/r2016-2/python_api/intro.htmlalias ipython='python -m ...
    Posted Sep 18, 2017, 12:46 PM by Dong Xu
  • APC Smart UPS The packages are: apcupsd and apcupsd-gui The status of the daemon can be found with: systemctl status apcupsd.service The graphical interface is: gapcmon And the config file is ...
    Posted Feb 23, 2017, 3:34 PM by Dong Xu
  • Ginger iptables/firewall It's turned on. To change config: vi /etc/iptables/rules.v4
    Posted Jan 30, 2017, 6:34 PM by Dong Xu
  • netcat/nc port scan Check if a port is opennc -z -v -w5 <host> <port/range>-w5: 5s timeout is optional
    Posted Jan 24, 2017, 3:52 PM by Dong Xu
  • Firefox 48 update on SLES 12 SP1 Initial update caused breaking of default Gnome Login Screen, the following will prevent it: 1. Open Yast2-->Software-->Software Management 2. Search for firefox 3. Select MozillaFirefox and bring up ...
    Posted Dec 15, 2016, 3:06 PM by Dong Xu
  • awk over ssh runhost.sh all "ps aux|grep virtualgrid|awk '{print \$2}'|head -1|xargs -ti kill {}"runhost.sh all 'nohup virtualgrid -nogui >& virtualgrid_`hostname`.log&'
    Posted Oct 14, 2016, 4:11 PM by Dong Xu
  • Real CPU Load top -b -n2 -p 1 | fgrep "Cpu(s)" | tail -1 | awk -F'id,' -v prefix="$prefix" '{ split($1, vs, ","); v=vs[length(vs)]; sub("%", "", v); printf "%s%.1f%%\n", prefix ...
    Posted Oct 1, 2016, 8:23 PM by Dong Xu
  • Check python unicode version ucs2 vs ucs4 This is for python 2.7When built with --enable-unicode=ucs4: >>> import sys >>> print sys.maxunicode 1114111 When built with --enable-unicode=ucs2: >>> import sys >>> print sys.maxunicode 65535 ...
    Posted Feb 23, 2017, 10:04 AM by Dong Xu
  • Remove python apps installed through “python setup.py install” "You need to remove all files manually, and also undo any other stuff that installation did manually. If you don't know the list of all files, you can reinstall ...
    Posted Sep 6, 2016, 11:59 PM by Dong Xu
  • Anaconda env for multi-users https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/qinxkmvlnSg sudo su - adduser anaconda mkdir /opt/anaconda ./path/to/Anaconda-latest.sh -b -p /opt/anaconda chown -R anaconda ...
    Posted Sep 6, 2016, 10:03 PM by Dong Xu
  • Monitor Installer/Program Changes in Windows 8 suggested tools https://www.raymond.cc/blog/tracking-registry-and-files-changes-when-installing-software-in-windows/Microsoft suggested tools https://msdn.microsoft.com/en-us/library/dd873573.aspx ...
    Posted Aug 26, 2016, 12:00 PM by Dong Xu
  • SUSE12 clone OS Disk Grub2 ext4 1. Use ddrescue to close to a new disk via USB3. Note that the source OS drive does not need umount2. The new disk should be able to boot ...
    Posted Aug 23, 2016, 5:38 PM by Dong Xu
  • GPU Overclock http://www.acceleware.com/blog/gpu-boost-nvidias-tesla-k40-gpushttp://cryptomining-blog.com/7341-how-to-squeeze-some-extra-performance-mining-ethereum-on-nvidia/https://devblogs.nvidia.com ...
    Posted Aug 17, 2016, 4:13 PM by Dong Xu
  • GPU fan speed control 1. Do this only onceEnabling Control of Fan Speed and generate xorg.conf file, Adds coolbits to the xorg filesudo nvidia-xconfig -a --cool-bits=28 --allow-empty ...
    Posted Aug 30, 2016, 3:57 PM by Dong Xu
  • Windows 8 AppLocker https://www.youtube.com/watch?v=ab5IGQr70-ghttps://www.youtube.com/watch?v=HAts_oDDdfQhttps://www.youtube.com/watch?v=Msbh56Iirbkhttps://www.youtube.com/watch?v=Z2 ...
    Posted Aug 12, 2016, 5:42 PM by Dong Xu
  • Windows 8 NSF http://superuser.com/questions/525473/how-do-i-mount-an-nfs-share-in-windows-8No NFSv4 Support!! only NFSv3 supportFor v4 support, try UMich program http://www.citi ...
    Posted Aug 12, 2016, 5:48 PM by Dong Xu
  • Windows 8 RDP Hack http://www.mysysadmintips.com/windows/clients/345-multiple-rdp-remote-desktop-sessions-on-windows-8http://www.nextofwindows.com/how-to-allow-multiple-concurrent-users-log-in-windows-8-through ...
    Posted Aug 12, 2016, 4:24 PM by Dong Xu
  • NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context This is GPU0 Titan Z in peppersee https://forums.gentoo.org/viewtopic-p-7588226.html[   26.328777] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  361 ...
    Posted Aug 14, 2016, 8:35 AM by Dong Xu
  • File encryption using OpenSSL and PGP Tar the directory tar cvf backup.tar /path/to/folder You can remove the [v] switch from the tar command to switch off the verbose mode. Encrypt openssl aes-256 ...
    Posted Aug 3, 2016, 10:29 AM by Dong Xu
  • Startup scipt for ubuntu 1. simple, requires rootvi /etc/rc.local2. upstart systemA simple command (one which doesn't need to remain running) could use an Upstart job like: start on ...
    Posted Aug 2, 2016, 5:18 PM by Dong Xu
  • Bash commands usage examples: sed, awk etc. #awk one linerhttp://www.pement.org/awk/awk1line.txthttp://tuxgraphics.org/~guido/scripts/awk-one-liner.html#sed one-linerhttp://sed.sourceforge.net/sed1line.txthttp://www ...
    Posted Oct 8, 2016, 11:10 PM by Dong Xu
  • Well said about GPUs, applicable to computing http://furryball.aaa-studio.eu/aboutFurryBall/benchmarks.html Always use the latest NVIDIA drivers! (some older versions can cause crashing of FurryBall) Remember, if you will use FurryBall with OLD ...
    Posted Aug 2, 2016, 5:20 PM by Dong Xu
  • BUG: soft lockup - CPU#1 stuck for 22s! [Xorg:2982] Solution: disabling C-states in the BIOS  and other CPU power-saving options such as Turbo Mode/Turbo Boost  etc.. should fix this.Some people also tried adding clocksource=jiffies ...
    Posted Aug 2, 2016, 9:53 AM by Dong Xu
  • Remove an IP address that DenyHosts blocked? /etc/denyhosts.confWORK_DIR=/var/lib/denyhostsIf you have been accidentally locked out of one of your hosts (because DenyHosts has added it to /etc/hosts.deny you ...
    Posted Apr 25, 2017, 3:34 PM by Dong Xu
  • Check Linux distro version, LSB, and diagnose binary file Count number of CPUsgrep -c ^processor /proc/cpuinfo mpstat -P ALL|head -1|cut -d'(' -f3|cut -d')' -f1Distro version (this will also show LSB version): lsb_release ...
    Posted Aug 2, 2016, 4:50 PM by Dong Xu
  • MAC address Start/stop network interfaceOld SUSEhttp://www.cyberciti.biz/faq/novell-sles-suse-restart-stop-networking-services-networking/SUSE11 ifup, ifdown, ifstatus https://www.suse.com/documentation/sled11/book ...
    Posted Jul 26, 2016, 1:09 AM by Dong Xu
  • Basename ${variable%pattern} Trim the shortest match from the end ${variable##pattern} Trim the longest match from the beginning ${variable%%pattern} Trim the longest match from the end ${variable#pattern} Trim ...
    Posted Jul 22, 2016, 8:23 PM by Dong Xu
  • Passwordless for sudo over ssh 1) sudo vi /etc/sudoers: jenkins ALL=(ALL) NOPASSWD: ALL 2) Put the line after all other lines in the sudoers file! That worked for Ubuntu 14.4 and SUSE12 ...
    Posted Jul 21, 2016, 12:10 AM by Dong Xu
  • Configure sshd openssh https://en.opensuse.org/SDB:Configure_openSSHWhenever you made a change to /etc/ssh/sshd_config you must restart the SSHD or make it reload its configuration by typing ...
    Posted Jul 21, 2016, 12:04 AM by Dong Xu
  • After.local You can also write your scripts and then execute them from /etc/init.d/after.local and /etc/init.d/halt.local The after.local script will be run after ...
    Posted Jul 20, 2016, 7:16 PM by Dong Xu
  • IPTables persistent https://blog.remibergsma.com/2013/02/12/automating-persistent-iptables-rules-on-red-hat-suse-and-debian/https://www.digitalocean.com/community/tutorials/how-to-implement-a-basic-firewall-template ...
    Posted Jul 20, 2016, 6:57 PM by Dong Xu
  • Schrodinger Docs Useful 2017-1https://www.schrodinger.com/sites/default/files/s3/mkt/Documentation/2017-1/docs/Documentation.htm2016-4https://www.schrodinger.com/sites/default/files/s3/mkt/Documentation/2016 ...
    Posted Mar 2, 2017, 5:23 PM by Dong Xu
  • clusterssh/cssh - multiple host ssh/exec https://github.com/duncs/clusterssh/wikiNeed to install tk.pm package for perlas root cpan -i Tk
    Posted Jul 14, 2016, 4:54 PM by Dong Xu
  • GPU nvidia-smi and Schrodinger Schrodinger:Second, ensure that all your cards have ECC memory turned off, are set to Exclusive Process Mode, and Persistence Mode is on. Disable ECC by running the following command ...
    Posted Aug 11, 2016, 10:10 PM by Dong Xu
  • Disable VMD GPU use You must set the CUDA-related environment variables in your shell prior to launching VMD. In the case of Unix systems, you'd do this: /bin/csh syntax: setenv VMDNOCUDA ...
    Posted Jul 15, 2016, 1:13 PM by Dong Xu
  • IPTables Block IP and IP Range This is the correct way: iptables -A INPUT -p tcp --match multiport --dport 1024:3000 -j ACCEPT As an example. Source here. iptables -A INPUT -p tcp --dport 1000:2000 ...
    Posted Jul 12, 2016, 7:57 AM by Dong Xu
  • SUSE12 Desktop Login Problems 1. If login windows does not show up, press CTRL-ALT-Backspace2. If still doesn't work, login as root, init 3init 5rm /run/nologinOtherwise "System ...
    Posted Jul 11, 2016, 3:34 PM by Dong Xu
  • Fail2ban unban IP   With Fail2Ban before v0.8.8: fail2ban-client get YOURJAILNAMEHERE actionunban IPADDRESSHERE With Fail2Ban v0.8.8 and later: fail2ban-client set YOURJAILNAMEHERE unbanip IPADDRESSHERE The hard part is finding ...
    Posted Jul 12, 2016, 7:46 AM by Dong Xu
  • Xargs ~$ echo 10 20 30 40 50 60 | xargs -n 1 -P 4 sleep The use of “-n 1” is vital if you want to pass only one command-line argument ...
    Posted Jul 9, 2016, 10:12 AM by Dong Xu
  • Super fast backup. copy, move many files To copy a large amount of data, tar is generally faster than rsync. The idea is to start with tar and finish off with a final rsync,tar -cpf - src ...
    Posted Jul 6, 2016, 11:09 PM by Dong Xu
  • Find examples 1. Recursively delete empty directories The find command is the primary tool for recursive, filesystem operations. Use the -type d expression to tell find you're interested in finding directories ...
    Posted Jul 5, 2016, 6:58 PM by Dong Xu
  • Super fast delete a folder with large number of files http://www.slashroot.in/which-is-the-fastest-method-to-delete-files-in-linuxtime perl -e 'for(<*>){((stat)[9]<(unlink))}'time find ./ -type f -delete (the BEST)time rsync ...
    Posted Jul 6, 2016, 9:20 AM by Dong Xu
  • Memory editing read: http://eryanbot.com/jtp/2012/06/26/game-hacking-basics-memory-editing-linux/http://ftlwiki.com/wiki/Cheats#Memory_Editing_on_LinuxLinux: scanmem https://github.com/scanmem/scanmem ...
    Posted Aug 2, 2016, 3:45 PM by Dong Xu
  • White Label hard drives https://forums.servethehome.com/index.php?threads/review-of-white-label-4tb-drives.3559/Testing: We shoved all the drives in 36 bay Supermicro chassis and LSI 9280 cards and ...
    Posted Jun 24, 2016, 3:04 PM by Dong Xu
  • GPU stress test gpu_burn-0.6.tar.gz (compatible with nvidia-smi and nvcc as of 04-12-2015)This is the best GPU test along with megadock.Note: must run the ...
    Posted Aug 9, 2016, 10:52 AM by Dong Xu
  • SUSE Rescue mode and chroot 1. Start the system with the rescue CD 2. Login with root (no password needed) 3. Mount the / partition. mount /dev/sdc3 /mntmount /dev/sdc1 /mnt/boot4. Give ...
    Posted May 23, 2016, 6:51 PM by Dong Xu
  • How to search DTP/NCI Compounds An easier option is to use Enhanced NCI Database Browser 2.2https://cactus.nci.nih.gov/ncidb2.2/In Query Data Value, paste SMILES string and set Tc threshold ...
    Posted Sep 5, 2016, 2:34 PM by Dong Xu
  • Python install pip, scipy, numpy, matplotlib Get pip first:Just follow the instructions here: Securely download get-pip.py.Make sure the python version is in the current SEARCH PATH , run sudo python get-pip.py ...
    Posted Mar 1, 2016, 11:12 AM by Dong Xu
  • Adduser vs Useradd (Debian/Ubuntu) Should use adduser which is a perl script that calls useradd and has enhanced features:http://unix.stackexchange.com/questions/121071/what-does-adduser-do-that-useradd-doesntLock a ...
    Posted Jun 25, 2016, 5:03 PM by Dong Xu
  • Intel WiDi installation 1. download and run Intel® WiDi Compatibility Tool  http://www.intel.com/content/www/us/en/support/emerging-technologies/000014931.html2. Get WiDi update tool  http://www.intel.com ...
    Posted Feb 5, 2016, 11:12 AM by Dong Xu
  • Configure X11/Xorg gdm after switching monitors or video cards A potential universal solution is:1. backup the current /etc/X11/xorg.conf2. reinstall nvidia driver3. use xorg.conf.saxsave and replace Device Section as follows. Note that ...
    Posted Feb 3, 2016, 2:24 PM by Dong Xu
  • Linux OS Disk Clone and ext3 resize, fdisk change partition type Essentially, to resize (shrink or enlarge) ext3 partition, we have to use resize2fs. Other methods are unsafeAomei and ddrescue are preferred methods for cloning Linux disks, albeit slower. Aomei ...
    Posted Mar 30, 2016, 9:37 AM by Dong Xu
  • Disk Clone Tools Samsung SSD: use Samsung data migration softwareOther SSD/HD requiresGPT and UEFI, recovery partition supportChoice:Macrium Reflect  (free or non-free version)Paragon's Migrate to SSD ...
    Posted Jan 24, 2016, 12:07 AM by Dong Xu
  • Backup to ACD Amanzon Cloud Drive Use rclone, copy the entire drive D including sub-dirs to ACDrclone.exe -c --log-file=test.log -v copy D:/ remote:wasabi/dnohup rclone -c -v --no ...
    Posted Jan 14, 2016, 1:12 PM by Dong Xu
  • Port Forwarding to Virtual Machine VMWare http://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/VMware Workstation users can select Edit –> Virtual Network Editor then follow ...
    Posted Jan 3, 2016, 7:20 PM by Dong Xu
  • Remote desktop from Linux rdesktop -g 1920x1080 host
    Posted Dec 31, 2015, 4:50 PM by Dong Xu
  • Denyhosts vs. iptables http://serverfault.com/questions/128962/denyhosts-vs-fail2ban-vs-iptables-best-way-to-prevent-brute-force-logons Note that DenyHosts will infact block other services - the main difference is that ...
    Posted Dec 30, 2015, 9:50 PM by Dong Xu
  • Setup Crontab/Rsync Automatic Backup on Windows Use windows copy the1st time backup and rsync for later incrementalUsed cwRsync version 3.12 (less buggy), need to copy its cygwin1.dll to mobaxterm slash/bin for this ...
    Posted Oct 22, 2016, 1:17 AM by Dong Xu
  • GPU Performance Tweak, GPU Boost Warning: Tweaking GPU Boost may be more than its worth because setting higher mclk/pclk will increase GPU temp and stability, triggering auto-throttle and resulting in lower performance. We ...
    Posted Dec 28, 2015, 2:58 PM by Dong Xu
  • FFMPEG CUDA acclerated (using NVEC) http://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/nvidia-linux/46654-using-nvidia-s-nvenc-on-linux-with-ffmpeg/page4
    Posted Dec 24, 2015, 2:30 PM by Dong Xu
  • Monitor CPU/GPU/Mem Utilization CPU/System Monitorvmstat -n 1GPU Monitor nvidia-smi dmon            Displays device stats in scrolling formatnvidia-smi pmon            Displays process stats in scrolling format.nvidia-smi topo -m ...
    Posted Dec 24, 2015, 2:26 PM by Dong Xu
  • Linux Kill Command Generally, you should use kill -15 before kill -9 to give the target process a chance to clean up after itself. (Processes can't catch or ignore SIGKILL, but they ...
    Posted Dec 24, 2015, 10:30 AM by Dong Xu
  • Select GPU for desmond MD jobs on a Multiple-CPU computer (compute and persistence mode) and set power limit Reference: http://on-demand.gputechconf.com/gtc/2014/presentations/S4253-tools-tips-for-managing-a-gpu-cluster.pdfInitializing a GPU in  runlevel 3 Most clusters operate at  runlevel 3 ...
    Posted Jan 1, 2016, 9:59 AM by Dong Xu
  • Compile OpenCL App - BUDE Reference: http://stackoverflow.com/questions/7542808/what-is-needed-to-compile-opencl-on-ubuntu-and-by-extension-opencl-periodFirst of all, CUDA library did not provide the needed cl ...
    Posted Dec 6, 2015, 9:22 PM by Dong Xu
  • Compile gcc-4.9.3 Follow this:http://stackoverflow.com/questions/27526452/gcc-g-4-7-install-on-suse-never-found-the-rpmlibpayloadislzmawget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.3/gcc ...
    Posted Nov 25, 2015, 9:16 PM by Dong Xu
  • Gromacs 5.1 Installation Works with gromacs-5.1 using gcc 4.4cmake-3.3.2 ../ -DCMAKE_INSTALL_PREFIX=/garlic/apps/gromacs-5.1/single  -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g ...
    Posted Oct 14, 2015, 12:21 AM by Dong Xu
  • Journal Letters and Communications Nature communications (Impact factor‎: ‎11.47 cost $5200, a bit too much)Nature Scientific Reports (IF: 5.578, cost ~$1500): http://www.nature.com/srep/publish/how-to-publishJACS ...
    Posted Sep 18, 2015, 3:31 PM by Dong Xu
  • JChem Excel Setup https://www.chemaxon.com/forum/ftopic4828.html
    Posted Sep 16, 2015, 8:24 PM by Dong Xu
  • yast zypper pacman bad key fuse-exfat sudo zypper in -d fuse-exfat #This downloads the rpm file but does not install sudo rpm -i --force --nodeps --nosignature /var/cache/zypp/packages/Essentials/x86_64/fuse-exfat ...
    Posted Sep 7, 2015, 2:10 PM by Dong Xu
  • Move windows 8 user folder http://answers.microsoft.com/en-us/windows/forum/windows_8-files/how-to-move-user-folders-to-2nd-drive-in-windows-8/f58029d0-bfcf-4fab-a266-a56f6d9e65b5a. Open up ...
    Posted Sep 1, 2015, 12:23 PM by Dong Xu
  • Ginger: ECS LIVA Box to run Linux Runs Linux (two distributions) with no problems AFTER setting the UEFI to non-protected boot.
    Posted Aug 12, 2015, 9:45 PM by Dong Xu
  • ASUS BIOS Config for AMD FX-8350 FX-8350 Scientific performance:http://techreport.com/review/23750/amd-fx-8350-processor-reviewed/12See the following CPU confighttp://www.legitreviews.com/amd-fx-8350-8-core-black ...
    Posted Aug 12, 2015, 9:49 AM by Dong Xu
  • iptables, delete/unblock an IP address iptables -D INPUT -s  x.x.x.x -j DROPiptables -D INPUT -s  x.x.x.x/32 -j DROPhttp://crybit.com/iptables-command-to-block-an-ip ...
    Posted Jul 29, 2015, 5:53 PM by Dong Xu
  • Disable ubuntu nginx web server sudo service nginx stopTo disable autostart nginx servicesudo update-rc.d -f nginx disableapt-get remove nginxvs.apt-get purge nginxFirst one removes all package ...
    Posted Jul 28, 2015, 7:04 PM by Dong Xu
  • Read multiple text files tail -n +1 * (Strictly speaking, tail -n +1 -- * is needed in case one of the file names begins with a -.)E.g. tail -n +1 -- -f -g tells tail that ...
    Posted Jul 27, 2015, 9:15 PM by Dong Xu
  • My First 5 Minutes On A Server; Or, Essential Security for Linux Servers http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-serversServer security doesn’t need to be complicated. My security philosophy is simple: adopt ...
    Posted Jul 25, 2015, 10:18 PM by Dong Xu
  • HDPARM 1. Get hard drive infohdparm -i /dev/sda                   (drive ID/SN)hdharm -I /dev/sda                   (detailed) -t   Perform device read timings -T   Perform cache read timings/dev/hda: Timing ...
    Posted Jul 25, 2015, 10:38 AM by Dong Xu
  • Format ext3 partition on >2TB drives The drive needs to be initialized with GPT (Windows Disk Management and Mini Partition Wizard) will worksee: http://www.ibm.com/developerworks/library/l-gpt/ORJust use LVM ...
    Posted Jul 23, 2015, 4:51 PM by Dong Xu
  • Dell Optiplex 990 Intel Network Card driver for SUSE The intel NIC driver is not included in 2.6.32 kernel (supposedly in 2.6.36), so we need1. Download driver source from https://downloadcenter.intel.com/download ...
    Posted Jul 23, 2015, 12:35 PM by Dong Xu
  • Denyhosts installation Other methods against brute force sshhttps://forum.openwrt.org/viewtopic.php?id=10417https://www.liberiangeek.net/2014/10/install-denyhosts-ubuntu-14-04-server/Not in apt-get ...
    Posted Jul 16, 2015, 7:24 AM by Dong Xu
  • Add iptables rules for Fail2ban mcaylor@ginger:~$ vi rules.v4 mcaylor@ginger:~$ sudo cp rules.v4 /etc/iptables/rules.v4mcaylor@ginger:~$ sudo cp rules.v4 /etc/network/iptables.up.rules mcaylor@ginger:~$ sudo iptables ...
    Posted Jul 13, 2015, 4:05 PM by Dong Xu
  • Stress to test sub-systems Usage: stress [OPTION [ARG]] ... -?, --help         show this help statement     --version      show version statement -v, --verbose      be verbose -q, --quiet        be quiet -n, --dry-run      show what would have been done ...
    Posted Mar 5, 2016, 7:28 PM by Dong Xu
  • logwatch http://somethingk.com/main/?p=407
    Posted Jul 10, 2015, 7:55 PM by Dong Xu
  • Memory Error with ASUS SABERTOOTH 990FX G.SKILL Ripjaws X Series 32GB (4 x 8GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model F3-1600C9Q-32GXM 32GB becomes 2GBWARNING: BIOS bug: CPU ...
    Posted Jul 11, 2015, 9:33 PM by Dong Xu
  • Fail2ban ubuntu https://www.digitalocean.com/community/tutorials/how-to-install-and-use-fail2ban-on-ubuntu-14-04https://help.ubuntu.com/community/Fail2ban
    Posted Jul 3, 2015, 5:38 PM by Dong Xu
  • Phpmyadmin auto log-out after "No activity within 1440 seconds"  sudo vi /garlic/apps/apache2/conf/httpd.conf add line php_admin_value session.gc_maxlifetime 86400 to <Location "/phpmyadmin"> block sudo vi /garlic/apps/apache2/htdocs/phpmyadmin/config.inc ...
    Posted Jul 2, 2015, 8:49 PM by Dong Xu
  • /var/log/warn does not have sshd refused hosts sudo vi /etc/ssh/sshd_config uncomment LogLevel INFO restart sshd.
    Posted Jul 2, 2015, 8:47 PM by Dong Xu
  • Putty ssh session timeout Client side:putty settings -> Connection and set the value of "Seconds between keepalives" to 30 For ssh commandline:ssh -o TCPKeepAlive=yes ssh.server.comServer side:vi /etc/ssh ...
    Posted Jun 28, 2015, 3:27 PM by Dong Xu
  • WinSCP error "Cannot initialize SFTP protocol. Is the host running a SFTP server?" Need to change sftp server path to the following in winscp "advanced..." menu:/usr/lib64/ssh/sftp-serverNew version of WinSCP doesn't have this issue
    Posted Sep 4, 2015, 5:22 PM by Dong Xu
  • wget background process wget mirror molport compound databaseswget -bqc -m ftp://username:passwd@molport.com/molport_database/2016-10/This will create the full path starting from molport.com as root dir ...
    Posted Oct 14, 2016, 9:27 AM by Dong Xu
  • Difference between 2 directories in linux diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > difference1.txt diff -r dir1 dir2 shows which files are only in dir1 and those only in dir2 diff -r dir1 ...
    Posted Jul 6, 2016, 8:51 AM by Dong Xu
  • Recursively count files in a Linux directory find DIR_NAME -type f | wc -l Explanation: -type f to include only files.| redirects find's command output to wc command.wc (short for word count) counts newlines, words ...
    Posted Jan 9, 2015, 10:37 AM by Dong Xu
  • ddrescue rescue drives ddrescue -d -f -r 30 /dev/[source] /dev/[target] >& log&Can also try dd_rescure, but most ppl say ddrescue is better.Note that -R can do reverse cloning from ...
    Posted Feb 15, 2016, 5:39 PM by Dong Xu
  • Linux I/O Redirect COMMAND_OUTPUT > # Redirect stdout to a file. # Creates the file if not present, otherwise overwrites it. ls -lR > dir-tree.list # Creates a file containing a listing of the directory ...
    Posted Nov 21, 2014, 7:31 PM by Dong Xu
  • Cron, rsync and backup Rsync local files and folders To copy the contents of one local folder into another, replacing the files in the destination folder, we use: rsync -rtv source_folder/ destination_folder ...
    Posted Apr 9, 2015, 10:15 PM by Dong Xu
  • smartd errors Nov 21 15:55:02 allspice smartd[4105]: Device: /dev/sdi [SAT], 16 Currently unreadable (pending) sectorsNov 21 15:55:02 allspice smartd[4105]: Device: /dev/sdi [SAT], 16 ...
    Posted Nov 21, 2014, 3:12 PM by Dong Xu
Showing posts 1 - 100 of 186. View more »

SCM-ADF

posted Apr 26, 2017, 12:24 PM by Dong Xu   [ updated Apr 26, 2017, 2:09 PM ]

https://www.scm.com/doc/Installation/Linux_Quickstart_Guide.html

ADF2017 uses VTK7 and newer OpenGL features to dramatically speed up the visualization of large systems. This comes with a higher requirement for the OpenGL version supported by the system: OpenGL 3.2. If your machine does not support this, you might get the following error message when starting the GUI:

Warning: In /home/builder/jenkins/workspace/trunk/label/centos6_impi_lxc/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 647
vtkXOpenGLRenderWindow (0x7b93c40): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work.

In such cases, a fallback mode is available that lowers the OpenGL requirement to version 1.4, but this fallback mode of course does not have the performance benefits of the newer OpenGL features. To enable the fallback mode, set the SCM_OpenGL1_FALLBACK environment variable to something non-zero:

export SCM_OpenGL1_FALLBACK=1
adfinput &

Encrypt shell script

posted Apr 26, 2017, 12:19 PM by Dong Xu   [ updated Apr 26, 2017, 12:56 PM ]

Alternative: https://unix.stackexchange.com/questions/90178/how-can-i-either-encrypt-or-render-my-shell-script-unreadable

  1. Write your script (script-base.sh)

    #!/bin/sh 
    echo "Hello World" 
  2. Encrypt your script (give a password):

    openssl enc -e -aes-256-cbc -a -in script-base.sh > script-enc 
  3. Write de Wrapper (script-final.sh):

    #!/bin/sh 
    openssl enc -d -aes-256-cbc -a -in script-enc | sh - 
  4. Run "script-final.sh", enter the password, and the script will run without write the plain text script on disk.

Rdkit Cairo Fix for Drawing Molecules

posted Apr 18, 2017, 5:00 PM by Dong Xu

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
AllChem.Compute2DCoords(m)
m = Chem.MolFromSmiles('c1nccc2n1ccc2')
Draw.MolToFile(m,'/tmp/test.png')

Errors pops up for normal users

Go to /garlic/apps/anaconda2/envs/py27_env/lib/python2.7/site-packages/cairo

sudo chmod 644 __init__.py  
sudo chmod 644 __init__.pyc

Linux Cheat Sheet

posted Apr 11, 2017, 5:30 PM by Dong Xu

https://sites.google.com/site/dxulab/gallery/linuxcheatsheet/DXULABReference.png?attredirects=0

Anaconda conda

posted Feb 27, 2017, 6:57 PM by Dong Xu   [ updated Sep 18, 2017, 12:46 PM ]

https://stackoverflow.com/questions/34441943/ipython-installed-but-not-found

ipython in Schrodinger virtual env http://content.schrodinger.com/Docs/r2016-2/python_api/intro.html

alias ipython='python -m IPython' or

alias schipython='source $SCHRODINGER/schrodinger.ve/bin/activate; python -m IPython'

To install readline to schrodinger.ve, requires

/home/xudong/apps/anaconda2/lib/python2.7/config/libpython2.7.a

and

libncurses5:i386
libncurses5-dev:i386
libncurses5-dev
libncurses5

when ready, run

LDFLAGS="-L/home/xudong/apps/anaconda2/lib/python2.7/config/" pip install readline

==========================================================

One workaround is to create clone environment, and then remove original one:

(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux)

conda create --name new_name --clone old_name
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`

There are several drawbacks of this method:

  1. it redownloads packages - you can use --offline flag to disable it,
  2. time consumed on copying environment's files,
  3. temporary double disk usage.


To install a specific version and build:

conda install rdkit=2016.03.4=np111py34_1

https://conda.io/docs/using/pkgs.html

==============================================================================
http://stackoverflow.com/questions/18640305/how-do-i-keep-track-of-pip-installed-packages-in-an-anaconda-conda-environment


conda-env now does this automatically (if pip was installed with conda).

You can see how this works by using the export tool used for migrating an environment:

conda env export -n <env-name> > environment.yml

The file will list both conda packages and pip packages:

name: stats
channels:
  - javascript
dependencies:
  - python=3.4
  - bokeh=0.9.2
  - numpy=1.9.*
  - nodejs=0.10.*
  - flask
  - pip:
    - Flask-Testing

If you're looking to follow through with exporting the environment, move environment.yml to the new host machine and run:

conda env create -f path/to/environment.yml
---------------------------


If you are trying to import packages from a second environment into the root environment, export package names from the second environment to a yaml file, then update the first environment. Within the second environment, run:

conda env export > environment.yml              
conda env update -n root -f environment.yml     

See conda env for more details.

Suggestion: backup your existing environments (see first command) before attempting changes to root and verify the desired outcome by testing these commands in a demo environment.

=======================================================================

For non-conda package, must use pip
pip install <tar.gz>
pip uninstall <package name>

List all of your packages in the active environment:

conda list

To list all of your packages installed into a non-active environment named snowflakes:

conda list -n snowflakes

Note that chemfp, yank, mdanalysis, and prody don’t have win64 version, only linux64 available
To search a package:
conda search packagename

if nothing find

anaconda search -t conda packagename
=======================================================

 http://prody.csb.pitt.edu/downloads/

conda install -c prody_devel prody=1.8.2
Now it seems to work, but I get this warning: The following packages will be DOWNGRADED:
anaconda:    4.0.0-np110py27_0 --> custom-py27_0

M
y suggestion will be using pip instead of conda.
pip is compatible with anaconda so it will be fine.

https://github.com/MDAnalysis/mdanalysis/wiki/Install
conda config --add channels MDAnalysis
conda install mdanalysis
conda update mdanalysis
http://mdtraj.org/latest/installation.html conda install -c omnia mdtraj

===================================================

1. Download and install Anaconda Python 2.7 version (64 or 32bit) under your apps folder

https://www.continuum.io/downloads

2. start a local terminal and run the following commands, internet access is needed:

vi ~/.bashrc

#add the following lines to the file

alias llt="ll -trha"
export PATH=~/apps/Anaconda2/envs/omnia_py34env:$PATH: ~/apps/Anaconda2/envs/omnia_py34env/Scripts
export KEY_MODELLER=XXX

#save ~/.bashrc and then type

source ~/.bashrc

#Then run the following commands one-by-one

conda config --add channels omnia
conda create -n omnia_py34env python=3.4
conda install -n omnia_py34env -c omnia pyemma
conda install -n omnia_py34env -c omnia pymbar
conda install -n omnia_py34env -c omnia pdbfixer
conda install -n omnia_py34env -c omnia openmm
conda install -n omnia_py34env -c omnia nose
conda install -n omnia_py34env -c omnia nose-timer
conda install -n omnia_py34env -c omnia msmbuilder
conda install -n omnia_py34env -c omnia mdtraj
conda config --add channels salilab
conda install -n omnia_py34env -c salilab modeller
==================================================================

bash ./Anaconda2-4.1.1-Linux-x86_64.sh
source ~/.bashrc
conda info
conda info -e
conda list|babel
conda list|grep babel
conda list|grep chem
conda list|grep sci
conda list|grep num
conda list|grep plot
anaconda
anaconda search -t conda chemfp
conda config --add channel r
conda config --add channels r
conda config --add channels bioconda
conda config --add channels omina
conda config --add channels salilab
conda info -e
conda info
conda create -n molfp python
conda config --remove channels omina
conda config --add channels omnia
conda info -e
conda create -n molfp python
source activate molfp
conda info -e
conda searcg rdkit
conda search rdkit
conda search chemfp
conda search babel
conda install chemfp=1.1p1
conda config --remove channels omnia
conda install chemfp=1.1p1

conda config --add channels MDAnalysis
conda info
conda search mdanalysis
conda install mdanalysis
conda list|grep read
anaconda search -t conda mdtraj
conda search mdtraj -c omnia
conda install mdtraj -c omnia
conda config --add channels omnia
conda install mdtraj -c omnia
conda config --add channels prody_devel
conda info
conda install prody
pip install -U ProDy

==============================================
To install Modeller using the 'conda' package manager, simply run from a command line
conda config --add channels salilab

conda install modeller

================================================
conda install -c omnia openmm
Verify your installation by typing the following command:
python -m simtk.testInstallation
============================

Conda vs PIP

If you’ve used pip and virtualenv in the past, you can use conda to perform all of the same operations. Pip is a package manager, and Virtualenv is an environment manager. Conda is both.

Task Conda package and environment manager command Pip package manager command Virtualenv environment manager command
Install a package conda install $PACKAGE_NAME pip install $PACKAGE_NAME X
Update a package conda update --name $ENVIRONMENT_NAME $PACKAGE_NAME pip install --upgrade $PACKAGE_NAME X
Update package manager conda update conda Linux/OSX: pip install -U pip Win: python -m pip install -U pip X
Uninstall a package conda remove --name $ENVIRONMENT_NAME $PACKAGE_NAME pip uninstall $PACKAGE_NAME X
Create an environment conda create --name $ENVIRONMENT_NAME python X cd $ENV_BASE_DIR; virtualenv $ENVIRONMENT_NAME
Activate an environment source activate $ENVIRONMENT_NAME X source $ENV_BASE_DIR/$ENVIRONMENT_NAME/bin/activate
Deactivate an environment source deactivate X deactivate
Search available packages conda search $SEARCH_TERM pip search $SEARCH_TERM X
Install package from specific source conda install --channel $URL $PACKAGE_NAME pip install --index-url $URL $PACKAGE_NAME X
List installed packages conda list --name $ENVIRONMENT_NAME pip list X
Create requirements file conda list --export pip freeze X
List all environments conda info --envs X Install virtualenv wrapper, then lsvirtualenv
Install other package manager conda install pip pip install conda X
Install Python conda install python=x.x X X
Update Python conda update python * X X
  • conda update python updates to the most recent in the series, so Python 2 to latest 2.x, Python 3 to latest 3.x, and so on.
   

APC Smart UPS

posted Feb 23, 2017, 3:34 PM by Dong Xu

The packages are: apcupsd and apcupsd-gui

The status of the daemon can be found with: systemctl status apcupsd.service

The graphical interface is: gapcmon

And the config file is: /etc/apcupsd/apcupsd.conf

Since the APC we are using is plugged into the usb 'UPSCABLE usb'  and 'UPSTYPE usb' while '#DEVICE /dev/ttyS0' needs to be commented out.

Ginger iptables/firewall

posted Jan 30, 2017, 6:34 PM by Dong Xu

It's turned on. To change config: vi /etc/iptables/rules.v4

netcat/nc port scan

posted Jan 24, 2017, 3:52 PM by Dong Xu

Check if a port is open
nc
-z -v -w5 <host> <port/range>

-w5: 5s timeout is optional

Firefox 48 update on SLES 12 SP1

posted Oct 26, 2016, 1:12 PM by Dong Xu   [ updated Dec 15, 2016, 3:06 PM ]

Initial update caused breaking of default Gnome Login Screen, the following will prevent it:

1. Open Yast2-->Software-->Software Management

2. Search for firefox

3. Select MozillaFirefox and bring up versions.

4. Select the latest version. (48 as of writing this.) Make sure it is the x86_64 package

5. Select break MozillaFirefox-branding-SLE-31 by ignoring some of its dependencies. (Do not uninstall it!)

6. Select break MozillaFIrefox-XX by ignoring some of its dependencies.

7. Hit accept

8. Look over automatic changes to make sure there is nothing unreasonable and hit ok.


If you uninstalled MozillaFirefox-branding it can cause important things to be uninstalled as there is a large cluster of interdependant branding packages linked to it. If you did uninstall it you need to reinstall it and a few other packages:

branding-SLE

gdm-branding-upstream

MozillaFirefox-branding-SLE

patterns-sles-Minimal

patterns-sle-gnome-basic

(I had to guess a bit on this list. Search for "branding" and "sle" then compare with other computers.)    

awk over ssh

posted Oct 14, 2016, 4:01 PM by Dong Xu   [ updated Oct 14, 2016, 4:11 PM ]


runhost.sh all "ps aux|grep virtualgrid|awk '{print \$2}'|head -1|xargs -ti kill {}"


runhost.sh all 'nohup virtualgrid -nogui >& virtualgrid_`hostname`.log&'

1-10 of 186