HackaMol

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Capture::Tiny" : "0.46",
            "Cwd" : "3.6",
            "HTTP::Tiny" : "0.070",
            "JSON::XS" : "3.04",
            "List::MoreUtils" : "0.428",
            "MCE" : "1.83",
            "Math::Vector::Real" : "0.18",
            "Math::Vector::Real::Random" : "0.03",
            "Math::Vector::Real::XS" : "0.10",
            "Math::Vector::Real::kdTree" : "0.15",
            "Modern::Perl" : "1.20",
            "Moose" : "2.20",
            "MooseX::StrictConstructor" : "0.21",
            "MooseX::Types::Path::Tiny" : "0.012",
            "Path::Tiny" : "0.104",
            "Test::Dir" : "0.0",
            "Test::Fatal" : "0.014",
            "Test::Moose" : "2.20",
            "Test::More" : "1.3",
            "Test::Output" : "1.03",
            "Test::Warn" : "0.30",

META.yml  view on Meta::CPAN

  Capture::Tiny: '0.46'
  Cwd: '3.6'
  HTTP::Tiny: '0.070'
  JSON::XS: '3.04'
  List::MoreUtils: '0.428'
  MCE: '1.83'
  Math::Vector::Real: '0.18'
  Math::Vector::Real::Random: '0.03'
  Math::Vector::Real::XS: '0.10'
  Math::Vector::Real::kdTree: '0.15'
  Modern::Perl: '1.20'
  Moose: '2.20'
  MooseX::StrictConstructor: '0.21'
  MooseX::Types::Path::Tiny: '0.012'
  Path::Tiny: '0.104'
  Test::Dir: '0.0'
  Test::Fatal: '0.014'
  Test::Moose: '2.20'
  Test::More: '1.3'
  Test::Output: '1.03'
  Test::Warn: '0.30'

Makefile.PL  view on Meta::CPAN

    "Capture::Tiny" => "0.46",
    "Cwd" => "3.6",
    "HTTP::Tiny" => "0.070",
    "JSON::XS" => "3.04",
    "List::MoreUtils" => "0.428",
    "MCE" => "1.83",
    "Math::Vector::Real" => "0.18",
    "Math::Vector::Real::Random" => "0.03",
    "Math::Vector::Real::XS" => "0.10",
    "Math::Vector::Real::kdTree" => "0.15",
    "Modern::Perl" => "1.20",
    "Moose" => "2.20",
    "MooseX::StrictConstructor" => "0.21",
    "MooseX::Types::Path::Tiny" => "0.012",
    "Path::Tiny" => "0.104",
    "Test::Dir" => "0.0",
    "Test::Fatal" => "0.014",
    "Test::Moose" => "2.20",
    "Test::More" => "1.3",
    "Test::Output" => "1.03",
    "Test::Warn" => "0.30",

Makefile.PL  view on Meta::CPAN

  "Capture::Tiny" => "0.46",
  "Cwd" => "3.6",
  "HTTP::Tiny" => "0.070",
  "JSON::XS" => "3.04",
  "List::MoreUtils" => "0.428",
  "MCE" => "1.83",
  "Math::Vector::Real" => "0.18",
  "Math::Vector::Real::Random" => "0.03",
  "Math::Vector::Real::XS" => "0.10",
  "Math::Vector::Real::kdTree" => "0.15",
  "Modern::Perl" => "1.20",
  "Moose" => "2.20",
  "MooseX::StrictConstructor" => "0.21",
  "MooseX::Types::Path::Tiny" => "0.012",
  "Path::Tiny" => "0.104",
  "Test::Dir" => "0.0",
  "Test::Fatal" => "0.014",
  "Test::Moose" => "2.20",
  "Test::More" => "1.3",
  "Test::Output" => "1.03",
  "Test::Warn" => "0.30",

dist.ini  view on Meta::CPAN

[@Basic]
[@Git]
[PodWeaver]
[PkgVersion]
[NextRelease]
[GithubMeta]
[Git::NextVersion]
[MetaJSON]
[MinimumPerlFast]
[Prereqs]
Modern::Perl               = 1.20  ; 
MooseX::StrictConstructor  = 0.21  ;
Math::Vector::Real         = 0.18  ;
Math::Vector::Real::XS     = 0.10  ; 
Math::Vector::Real::Random = 0.03  ;
Math::Vector::Real::kdTree = 0.15 ; 
Moose                      = 2.20  ;
MCE                        = 1.83  ;
JSON::XS                   = 3.04  ;
YAML::XS                   = 0.69  ;
MooseX::Types::Path::Tiny  = 0.012 ; 

examples/Analysis/BackBone_Dihedrals.pl  view on Meta::CPAN

#!/usr/bin/env perl
# DMR: update 04-10-2014
# print out backbone dihedrals for each model in an NMR ensemble
use Modern::Perl;
use HackaMol;
use Time::HiRes qw(time);

my $t1 = time;

my $hack = HackaMol->new( name => "hackitup" );

my $mol = $hack->read_file_mol("t/lib/2LL5_mod123.pdb");

#backbone

examples/Analysis/Bfact.pl  view on Meta::CPAN

use Modern::Perl;
use HackaMol;
use List::Util qw(sum0);

my $mol = HackaMol->new->pdbid_mol('2cba');
my %select = (
    "protein" => ['protein'],
    "water"   => ['water'],
    "HETATM"  => ['record_name HETATM'],
    "not_water/protein", ['record_name HETATM','.not. water']
);

examples/Analysis/mol_maxdist.pl  view on Meta::CPAN

# Demian Riccardi May 23, 2014
# Quickly find the maximum distance in a molecule
# 
use Modern::Perl;
use Math::Vector::Real::Farthest;
use HackaMol;
use Time::HiRes qw(time);

my $hack = HackaMol->new(
    hush_read => 1,
    data      => "/lustre/pdbqts/NCI_diversitySet2/pdbqt"
);

my @pdbqts = $hack->data->children(qr/\.pdbqt/);

examples/BFP/2cba.pl  view on Meta::CPAN

use Modern::Perl;
use HackaMol;

my $mol_2cba = HackaMol->new()->pdbid_mol('2cba');
my $CA_group = $mol_2cba->select_group('name CA');
$CA_group->calc_bfps;

foreach my $at ($CA_group->all_atoms){
    printf("%4i %5.2f %5.2f\n", $at->resid, $at->bfact, $at->bfp );
}

examples/Benchmarks/Atom-MVR-timer.pl  view on Meta::CPAN

#!/usr/bin/env perl
# 
use Modern::Perl;
use Math::Vector::Real;
use Time::HiRes qw(time);
use Benchmark qw(cmpthese);
use Scalar::Util qw(refaddr);
use HackaMol::Atom;

my $natoms = 100000;
print
"Atom-timer will time the construction of an array of  $natoms atoms to give idea about speed\n";

examples/Benchmarks/MVR.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use Math::Vector::Real;
use Math::VectorReal;
use Time::HiRes qw(time);
use Benchmark qw(cmpthese);

my $v1aa = V( 1.1, 2.0, 3.1 );
my $v2aa = V( 2.1, 3.0, 1.1 );
my $dvaa = $v2aa - $v1aa;
my $distaa = sqrt( $dvaa * $dvaa );

examples/Benchmarks/Mem.pl  view on Meta::CPAN

use Modern::Perl;
use Devel::Size;
use HackaMol;
use Math::Vector::Real;
use Time::HiRes qw(time);

my $t1 = time;
my @atoms = map {HackaMol::Atom->new(Z=>'1', coords=>[V(rand,rand,rand)])} 0 .. 100000; 
my $t2 = time;

printf ("Time: %.3f\n", $t2-$t1);

examples/Capsid/capsid.pl  view on Meta::CPAN

######################################################################
#  capsid.pl
#
#  generate all coordinates for a viral capsid (1QGT)
#
######################################################################
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;

my $pdbid = '1QGT';

my $mol = HackaMol->new()->pdbid_mol($pdbid);

my @symops = <DATA>;

my %sym_op = (); # a hash to store all symmetry operations

examples/Cofactor/feheme.pl  view on Meta::CPAN

#!/usr/bin/env perl
#
# DMR 4-15-2014
# simple script to help get started analyzing cofactors/metals in proteins 
#
# wget http://pdb.org/pdb/files/1C7D.pdb
#
# run:
# perl feheme.pl 1C7D.pdb 
#
use Modern::Perl;
use HackaMol;
use Statistics::Descriptive;

my $hack  = HackaMol->new ;
# load all atoms into an array
my @atoms = $hack->read_file_atoms(shift);

#pull out iron atoms
my @Fes   = grep {$_->symbol eq "Fe"} @atoms;

examples/GSSG/GSSG_3DK4.pl  view on Meta::CPAN

#!/usr/bin/env perl
# This script will: 
#  1. pull down pdbid 3DK4 from the PDB
#  2. extract the GSSG
#  3. write out a new pdb containing only the GSSG 
#
# pubchem id can also be used to fetch
# @ids = qw/65359/;
#
use Modern::Perl;
use HackaMol;

my $hack = HackaMol->new(scratch=>'structures');
$hack->scratch->mkpath unless $hack->scratch->exists;

unless ( -e "structures/3DK4.pdb" ){
  system("wget http://pdb.org/pdb/files/3DK4.pdb");
  system("mv 3DK4.pdb structures/3DK4.pdb");
} 

examples/GSSG/GSSG_GSHgSG.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi, May 27, 2014
#
# This script will add an Hg across the disulfide in GSSG
#
# use GSSG_3DK4.pl first to set up
use Modern::Perl;
use HackaMol;

my $hack = new HackaMol;

my @atoms = $hack->read_file_atoms("structures/GSSG.pdb");

my ($ss) = $hack->find_disulfide_bonds( @atoms );
my $mol = HackaMol::Molecule->new( atoms => [@atoms] );

my $bl = $ss->bond_length;

examples/GSSG/GSSG_rotate.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi, May 27, 2014
#
# This script will rotate atoms about the disulfide bond in GSSG 
#
# use GSSG_3DK4.pl first to set up
use Modern::Perl;
use HackaMol;

my $tang = shift || 90;

my $hack = new HackaMol;

my @atoms = $hack->read_file_atoms("structures/GSSG.pdb");
my ($dihe) = $hack->build_dihedrals( @atoms[ 13, 14, 34, 33 ] );

my $mol = HackaMol::Molecule->new( atoms => [@atoms] );

examples/MCE/carve_around_ss_mce.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;
use MCE;

my @pdbs    = glob("pdbs/*.pdb");


my $MAX_PROCESSES = 8;

my $mce = MCE->new(
   max_workers => $MAX_PROCESSES,

examples/MCE/heavy_mvr.pl  view on Meta::CPAN

#!/usr/bin/env perl
# repetitive calculation of the average vector length for a sphere 
# of random vectors shows capabilities of using MCE to use multiple cores.
use Modern::Perl;
use Math::Vector::Real;
use Math::Vector::Real::Random;
use MCE::Map; #carry out the map using the many core engine
use Time::HiRes qw(time);

my $t1   = time;
my @avg  = mce_map { 
                 my @mvrs = &gen_mvr_sphere;
                 my $sum = 0;
                 $sum += abs($_) foreach @mvrs;

examples/MolAdjust/readpdb_select_write.pl  view on Meta::CPAN

#   perl readpdb_select_write.pl some.pdb   
#
# reads pdb (via shift of @ARGV) 
# prints a selection to STDOUT
#
# useful for overlaying visualizations with general selections in VMD
# or whatever. All accomplished without creating any variables to show
# some object method chaining. 
#

use Modern::Perl;
use HackaMol;

HackaMol::Molecule -> new (
    atoms=>[
            grep {
                   $_->name eq "N"  or
                   $_->name eq "O"  or
                   $_->name eq "C"  or
                   $_->name eq "CA" or
                   $_->bfact > 0.25

examples/MolAdjust/strip_tip_rename_his.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi  February 20, 2014
# 
# strips out TIP from pdb and renames HIS residues 
# pdb adjustments needed to submit pdb generated from charmm simulation 
# to COACH: http://zhanglab.ccmb.med.umich.edu/COACH/
#
use Modern::Perl;
use HackaMol;

my $hack = HackaMol->new(name=>"hackitup");
my @atoms = map  {
                  $_->resname('HIS') if $_->resname =~ /HSD|HSE|HSP/;
                  $_;
                 }
            grep {
                  $_->resname !~ /TIP|CLA/ 
                 } $hack->read_file_atoms(shift);

examples/MolFun/Maximum_distance.pl  view on Meta::CPAN

#!/usr/bin/env perl

use Modern::Perl;
use Math::Vector::Real::Farthest;
use HackaMol;

my $hack = HackaMol->new(data=>"local_pdbs");

my @pdbs = $hack -> data -> children ( qr/\.pdb/ );

foreach my $pdb ( @pdbs ){

  my @xyzs = map{$_->xyz} $hack->read_file_atoms($pdbqt);

examples/MolFun/Orbit_Protein.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;

my $hack = HackaMol->new( name => 'hackitup' );

my @atoms1 = $hack->read_file_atoms("t/lib/1L2Y.pdb");
my $mol1 = HackaMol::Molecule->new( name => 'trp-cage', atoms => [@atoms1] );

my @atoms2 = $hack->read_file_atoms("t/lib/2cba.pdb");
my $mol2 = HackaMol::Molecule->new( name => 'CAII', atoms => [@atoms2] );

examples/MolFun/bin_expand.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi August, 22, 2013
#
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;

my $t1    = time;
my $angle = shift;
$angle = 180 unless ( defined($angle) );

my $hack = HackaMol->new( name => "hackitup" );

my @atoms = $hack->read_file_atoms("t/lib/1L2Y.pdb");

examples/MolFun/graphene_roll.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;
use Time::HiRes qw(time);

my $t1 = time;
my $l = 1.42;

my $hack = HackaMol->new(name => "hackitup");

my $a1    = V(     0,  $l*sqrt(3),      0);

examples/MolFun/loadPDB_transrot.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;

my $hack = HackaMol->new( name => "hackitup" );

my @atoms = $hack->read_file_atoms("t/lib/1L2Y_mod123.pdb");
my $mol   = HackaMol::Molecule->new( name => 'trp-cage', atoms => [@atoms] );

$mol->print_xyz;

examples/MolFun/spinning_ball.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi
# This script loads 1L2Y.pdb and then generates xyz coordinates for the molecule spinning across the screen
# to run:
#   perl spinning_ball.pl > spinning_ball.xyz
# 
# then load into your favorite GUI.  I use VMD
use Modern::Perl;
use HackaMol;
use Math::Vector::Real;

my $bld = HackaMol->new( name => "build" );
my $mol = $bld->pdbid_mol('1l2y');

$mol->translate( -$mol->COM );
$mol->translate( V( 90, 0, 0 ) );

foreach ( 1 .. 360 ) {

examples/MolFun/unfoldBB_mol.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi 2013/09/16
#
# Description
# grep out the backbone atoms and rotate the dihedrals to the angle read in
# adding the sidechains shouldn't be too difficult.  Just have to identify which
# atoms are moving
use Modern::Perl;
use HackaMol;
use Time::HiRes qw(time);

my $t1    = time;
my $angle = shift;
$angle = 180 unless ( defined($angle) );

my $hack = HackaMol->new( name => "hackitup" );
my @all_atoms = $hack->read_file_atoms("t/lib/1L2Y.pdb");

examples/MolFun/unfoldBB_movie.pl  view on Meta::CPAN

#!/usr/bin/env perl
# Demian Riccardi 2013/09/16
#
# Description
# grep out the backbone atoms and rotate the dihedrals by increment until
# they are close to 180 degrees
use Modern::Perl;
use HackaMol;
use Time::HiRes qw(time);

my $t1    = time;
my $angle = shift;
$angle = 180 unless ( defined($angle) );

my $hack = HackaMol->new( name => "hackitup" );

#my @all_atoms = $hack->read_file_atoms("t/lib/2cba.pdb");

examples/MolReadPrintWrite/pdbqt_pdb.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;

my $bldr = HackaMol->new( name => "builder", hush_read=>1 );
my @atoms = $bldr->read_file_atoms("t/lib/test.pdbqt");

# all coordinates from NMR ensemble are loaded into atoms
my $mol = HackaMol::Molecule->new(
    name  => 'somedrug',
    atoms => [@atoms]
);

examples/MolReadPrintWrite/print_ts.pl  view on Meta::CPAN

#!/usr/bin/env perl
use Modern::Perl;
use HackaMol;

my $hack = HackaMol->new( name => "hackitup" );
my $mol  = $hack->read_file_mol("1L2Y.pdb"); #download from pdb.org
$mol->print_pdb_ts([3 .. 15],'print_ts_test.pdb');



( run in 0.469 second using v1.01-cache-2.11-cpan-4d50c553e7e )